84% recommendations

Code Review | Recommendations

WordPress plugin Recommendations scored84%from 54 tests.

About plugin

  • Plugin page: recommendations
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 20, 2017
  • Number of updates: 10
  • Update frequency: every 74.9 days
  • Top authors: DeFries (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.50ms] Passed 4 tests

Server-side resources used by Recommendations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1137.05 ▼0.28
Dashboard /wp-admin3.41 ▲0.1146.46 ▼1.46
Posts /wp-admin/edit.php3.46 ▲0.1046.95 ▼2.07
Add New Post /wp-admin/post-new.php5.99 ▲0.1182.77 ▼17.81
Media Library /wp-admin/upload.php3.33 ▲0.1033.06 ▼0.65
Providers /wp-admin/edit-tags.php?taxonomy=providers&post_type=recommends3.3336.37
Add New Link /wp-admin/post-new.php?post_type=recommends3.3743.70
Genre /wp-admin/edit-tags.php?taxonomy=genre&post_type=recommends3.3334.12
Recommends /wp-admin/edit.php?post_type=recommends3.3735.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Recommendations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.25 ▼0.481.54 ▼0.0537.24 ▼4.09
Dashboard /wp-admin2,233 ▲535.56 ▼0.1087.56 ▼5.8437.66 ▼10.19
Posts /wp-admin/edit.php2,138 ▲351.98 ▲0.0139.97 ▼0.6132.93 ▼4.90
Add New Post /wp-admin/post-new.php1,555 ▲2023.23 ▲4.91653.29 ▲37.8362.42 ▼26.48
Media Library /wp-admin/upload.php1,438 ▲384.21 ▲0.02104.41 ▲8.6942.59 ▼0.94
Providers /wp-admin/edit-tags.php?taxonomy=providers&post_type=recommends1,2812.1227.0930.25
Add New Link /wp-admin/post-new.php?post_type=recommends1,6402.7855.1549.69
Genre /wp-admin/edit-tags.php?taxonomy=genre&post_type=recommends1,2782.2427.1328.59
Recommends /wp-admin/edit.php?post_type=recommends1,0981.9630.2531.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • 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)
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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommendations/recommendations.php:74

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: recommendations, recommend, out, links, affiliate...

recommendations/recommendations.php Passed 13 tests

The principal PHP file in "Recommendations" v. 0.3.3 is loaded by WordPress automatically on each request
121 characters long description:
Complete URL management system that allows you create, manage, and track outbound links from your site via 301 redirects.

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
Everything looks great! No dangerous files found in this plugin244 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP146136215
Markdown120029

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected