10% wp-promoter

Code Review | WP Promoter

WordPress plugin WP Promoter scored10%from 54 tests.

About plugin

  • Plugin page: wp-promoter
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Jan 2, 2015
  • Number of updates: 16
  • Update frequency: every 3.8 days
  • Top authors: rahulbhangale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,322 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/wp-promoter/admin-wp-promoter.php+229
    syntax error, unexpected '}', expecting end of file

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

Server-side resources used by WP Promoter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.49 ▼1.75
Dashboard /wp-admin3.31 ▼0.0442.81 ▼15.16
Posts /wp-admin/edit.php3.36 ▲0.0044.86 ▼3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.38 ▼16.59
Media Library /wp-admin/upload.php3.23 ▲0.0036.07 ▲1.53

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

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

Browser metrics Passed 4 tests

WP Promoter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.111.57 ▼0.1141.12 ▼2.02
Dashboard /wp-admin2,206 ▲185.80 ▲0.7297.67 ▼16.1339.60 ▼3.49
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0141.43 ▲7.0735.49 ▼0.58
Add New Post /wp-admin/post-new.php1,514 ▼2817.57 ▼0.84663.73 ▲44.9561.49 ▲2.72
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0594.59 ▼2.2241.45 ▼2.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/wp-promoter/admin-wp-promoter.php on line 229
    • > PHP Fatal error
      Uncaught Error: Class 'WPP_stat' not found in wp-content/plugins/wp-promoter/admin/templates/stats.php:1

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 88% 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 your attention:
  • Screenshots: Screenshot #9 (View Visitors Statistics to manage your promotion) image missing
  • Plugin Name: Please specify the plugin name on the first line ( === wp-promoter === )
Please take inspiration from this readme.txt

wp-promoter/wp-promoter.php Passed 13 tests

This is the main PHP file of "WP Promoter" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
Promote your services with the eye catching features of WP Promoter plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,917 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS342511,239
PHP57324662
JavaScript10016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity18.67
▷ Minimum class complexity3.00
▷ Maximum class complexity28.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
28 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
css/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%