10% plugin-promoter

Code Review | Plugin Promoter

WordPress plugin Plugin Promoter scored10%from 54 tests.

About plugin

  • Plugin page: plugin-promoter
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.3
  • WordPress version: 6.3.1
  • First release: Feb 17, 2012
  • Latest release: Feb 17, 2012
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: misternifty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,126 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/plugin-promoter/widget.php+39
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼56.68ms] Passed 4 tests

An overview of server-side resources used by Plugin Promoter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.3210.02 ▼30.93
Dashboard /wp-admin2.16 ▼1.146.40 ▼46.95
Posts /wp-admin/edit.php2.17 ▼1.196.16 ▼44.50
Add New Post /wp-admin/post-new.php2.16 ▼3.727.04 ▼101.70
Media Library /wp-admin/upload.php2.16 ▼1.065.53 ▼33.56

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_plugin_promoter
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Promoter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▲0.021.79 ▲0.2042.15 ▼4.30
Dashboard /wp-admin2,198 ▲215.59 ▼0.0791.42 ▼6.3939.56 ▼0.34
Posts /wp-admin/edit.php2,097 ▼02.00 ▲0.0239.44 ▲4.1435.44 ▲0.42
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▼0.01671.23 ▲10.0455.89 ▲4.71
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.0598.84 ▼21.9943.04 ▼8.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/plugin-promoter/widget.php+39
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_plugin_promoter
    • 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 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/plugin-promoter/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/plugin-promoter/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Plugin Badge Widget), #2 (Plugin Detail Page), #3 (Plugin Detail Page w/ Screenshots)
You can take inspiration from this readme.txt

plugin-promoter/plugin-promoter.php 92% from 13 tests

"Plugin Promoter" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected598 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1661368
PHP24512227
JavaScript1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.48MB with 0.35MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.59KB6.92KB▼ 74.94%
screenshot-2.png160.96KB48.33KB▼ 69.98%
screenshot-3.png304.21KB89.74KB▼ 70.50%