10% recommender

Code Review | Recommender

WordPress plugin Recommender scored 10% from 54 tests.

About plugin

  • Plugin page: recommender
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Apr 28, 2018
  • Number of updates: 15
  • Update frequency: every 28.7 days
  • Top authors: missprogrammer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 679 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPRecommenderIr\Init::activation() should not be called statically

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

This is a short check of server-side resources used by Recommender
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.38 ▼6.23
Dashboard /wp-admin3.38 ▲0.0748.49 ▼0.22
Posts /wp-admin/edit.php3.49 ▲0.1352.79 ▲10.52
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.45 ▲2.59
Media Library /wp-admin/upload.php3.30 ▲0.0736.51 ▲4.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
recom_active_copy
recom_active_read
widget_theysaidso_widget
recom_active_scroll
recom_active_cart
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
...

Browser metrics Passed 4 tests

Recommender: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲3813.30 ▲0.001.91 ▼0.4442.48 ▼1.40
Dashboard /wp-admin2,221 ▲185.84 ▲0.04105.55 ▼5.8243.94 ▲2.36
Posts /wp-admin/edit.php2,104 ▲152.03 ▲0.0135.13 ▲1.8634.15 ▼0.03
Add New Post /wp-admin/post-new.php1,552 ▲1018.25 ▼5.02647.17 ▼65.1858.96 ▲8.71
Media Library /wp-admin/upload.php1,409 ▲214.32 ▲0.1299.42 ▼12.0046.14 ▲0.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 11 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recommender_widget
    • recom_active_copy
    • widget_theysaidso_widget
    • recom_active_scroll
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • recom_active_cart
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/recommender/assets/templates/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Main settings), #2 (Advanced settings), #3 (Widget)
The official readme.txt might help

recommender/index.php 92% from 13 tests

The main file in "Recommender" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("recommender.php" instead of "index.php")

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
There were no executable files found in this plugin1,960 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP183942431,520
PO File16065166
JavaScript4408150
CSS120694
JSON20026
Markdown1204

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity20.00
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods81
▷ Static methods1316.05%
▷ Public methods7795.06%
▷ Protected methods22.47%
▷ Private methods22.47%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png78.66KB32.29KB▼ 58.96%
screenshot-3.png22.42KB8.26KB▼ 63.18%
screenshot-1.png36.67KB14.39KB▼ 60.75%