68% recommend-us

Code Review | Recommend Us

WordPress plugin Recommend Us scored68%from 54 tests.

About plugin

  • Plugin page: recommend-us
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2014
  • Latest release: Feb 1, 2015
  • Number of updates: 14
  • Update frequency: every 4.5 days
  • Top authors: shahalom (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,397 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.40ms] Passed 4 tests

An overview of server-side resources used by Recommend Us
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1943.70 ▼8.42
Dashboard /wp-admin3.50 ▲0.2063.12 ▲12.37
Posts /wp-admin/edit.php3.62 ▲0.2649.58 ▼2.93
Add New Post /wp-admin/post-new.php6.10 ▲0.2290.99 ▼9.53
Media Library /wp-admin/upload.php3.43 ▲0.2041.48 ▲11.27
Options /wp-admin/admin.php?page=fp_admin_options_page3.3936.72
Instructions /wp-admin/admin.php?page=msrp_settings_main3.3937.63
Add Recommendation /wp-admin/admin.php?page=msrp_admin_add_edit3.3936.76
Approved Recommendations /wp-admin/admin.php?page=fp_admin_approved_recommendation_page3.4335.00
Pending Recommendations /wp-admin/admin.php?page=fp_admin_pending_recommendation_page3.4337.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: 1 new table, 7 new options
New tables
wp_msbd_recommends
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
msr_options
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Recommend Us: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲15313.84 ▼0.7410.30 ▲8.2842.99 ▼4.57
Dashboard /wp-admin2,223 ▲465.68 ▲0.0488.15 ▼4.7171.63 ▲32.09
Posts /wp-admin/edit.php2,140 ▲402.01 ▲0.0433.22 ▼3.3433.90 ▼1.35
Add New Post /wp-admin/post-new.php1,714 ▲18622.33 ▼0.77703.40 ▲12.3753.22 ▼0.38
Media Library /wp-admin/upload.php1,440 ▲374.26 ▲0.07100.57 ▼2.2565.72 ▲23.55
Options /wp-admin/admin.php?page=fp_admin_options_page1,1155.25146.7142.79
Instructions /wp-admin/admin.php?page=msrp_settings_main1,0674.90149.9528.68
Add Recommendation /wp-admin/admin.php?page=msrp_admin_add_edit1,0714.6892.3335.45
Approved Recommendations /wp-admin/admin.php?page=fp_admin_approved_recommendation_page1,1974.8488.7231.92
Pending Recommendations /wp-admin/admin.php?page=fp_admin_pending_recommendation_page1,1944.8289.2436.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_msbd_recommends
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • msr_options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/recommend-us/recommend-us.php:15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/recommend-us/lib/recommend-us-admin-tables.php on line 7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/recommend-us/lib/recommend-us-admin-tables.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'MSBDDB' not found in wp-content/plugins/recommend-us/lib/recommend-us-db.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/recommend-us/lib/recommend-us-admin-tables.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fp_admin_pending_recommendation_page
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

recommend-us/recommend-us.php 92% from 13 tests

The main PHP script in "Recommend Us" version 2.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,877 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP82721191,402
SVG100228
CSS3164216
JavaScript28031

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.62
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods82
▷ Static methods89.76%
▷ Public methods82100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/msbd_logo.png28.81KB9.10KB▼ 68.41%
images/msbd_favicon_16.png0.61KB0.63KB0.00%
images/msbd_favicon_32.png1.12KB1.20KB0.00%