84% sm-featured-author

Code Review | SM Featured Author

WordPress plugin SM Featured Author scored84%from 54 tests.

About plugin

  • Plugin page: sm-featured-author
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Sep 9, 2014
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: sivajimangipudi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.98ms] Passed 4 tests

An overview of server-side resources used by SM Featured Author
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.23 ▼3.61
Dashboard /wp-admin3.31 ▲0.0152.94 ▼2.11
Posts /wp-admin/edit.php3.36 ▲0.0148.11 ▼3.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.07 ▼2.32
Media Library /wp-admin/upload.php3.23 ▲0.0137.28 ▲0.93

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for SM Featured Author
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.76 ▲0.411.75 ▲0.0543.51 ▼0.36
Dashboard /wp-admin2,209 ▲214.85 ▼1.05100.66 ▼0.7440.93 ▲1.18
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0235.54 ▼4.5732.84 ▼5.63
Add New Post /wp-admin/post-new.php1,542 ▲918.13 ▼5.11654.39 ▼74.8267.40 ▲0.21
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.04102.73 ▲3.1143.88 ▼3.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sm-featured-author/smfeaturedauthors.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
You can take inspiration from this readme.txt

sm-featured-author/smfeaturedauthors.php 92% from 13 tests

Analyzing the main PHP file in "SM Featured Author" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sm-featured-author.php" instead of "smfeaturedauthors.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected49 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10032
PHP211217

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png58.08KB16.20KB▼ 72.10%