84% recommend

Code Review | Recommend

WordPress plugin Recommend scored84%from 54 tests.

About plugin

  • Plugin page: recommend
  • Plugin version: 0.6.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: May 6, 2021
  • Latest release: Mar 20, 2023
  • Number of updates: 20
  • Update frequency: every 34.2 days
  • Top authors: mattlitzinger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /605 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.72ms] Passed 4 tests

Server-side resources used by Recommend
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0844.56 ▲7.63
Dashboard /wp-admin3.39 ▲0.0848.36 ▼4.45
Posts /wp-admin/edit.php3.50 ▲0.1544.51 ▲3.08
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.26 ▼21.36
Media Library /wp-admin/upload.php3.31 ▲0.0835.11 ▼0.14
Recommend /wp-admin/options-general.php?page=recommend3.2828.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
wp_recommend_settings
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Recommend
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.60 ▼0.9310.82 ▲9.2246.79 ▲2.96
Dashboard /wp-admin2,201 ▲215.55 ▲0.0385.03 ▼1.7639.55 ▲0.98
Posts /wp-admin/edit.php2,113 ▲131.96 ▼0.0234.35 ▼5.0834.70 ▲1.81
Add New Post /wp-admin/post-new.php1,545 ▲1718.24 ▼4.48614.10 ▼61.1967.84 ▲12.11
Media Library /wp-admin/upload.php1,409 ▲124.18 ▼0.01105.08 ▲3.7547.31 ▲1.19
Recommend /wp-admin/options-general.php?page=recommend8811.6923.5129.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommend/inc/rest-api.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/recommend/recommend.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommend/inc/admin.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: thumbs up, like, recommend, heart

recommend/recommend.php 92% from 13 tests

"Recommend" version 0.6.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 249 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected572 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP477131457
JavaScript1122588
CSS14022
Markdown1305

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions26
▷ Named functions2492.31%
▷ Anonymous functions27.69%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin