67% quick-recommend

Code Review | Quick Recommend

WordPress plugin Quick Recommend scored67%from 54 tests.

About plugin

  • Plugin page: quick-recommend
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 1, 2018
  • Latest release: Feb 24, 2018
  • Number of updates: 5
  • Update frequency: every 5.0 days
  • Top authors: shedsimas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /633 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.57MB] [CPU: ▲0.39ms] Passed 4 tests

A check of server-side resources used by Quick Recommend
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.87 ▲1.4147.33 ▲4.86
Dashboard /wp-admin4.95 ▲1.6159.42 ▼7.51
Posts /wp-admin/edit.php5.01 ▲1.6661.59 ▲5.56
Add New Post /wp-admin/post-new.php7.55 ▲1.67109.11 ▼1.36
Media Library /wp-admin/upload.php4.82 ▲1.5955.21 ▲20.53
Rec. Types /wp-admin/edit-tags.php?taxonomy=rec_type&post_type=recommendation4.8259.62
Options /wp-admin/admin.php?page=qrec_options_admin_page4.7543.67
Recommendations /wp-admin/edit.php?post_type=recommendation4.8565.60
Add Rec. /wp-admin/post-new.php?post_type=recommendation5.0566.56

Server storage [IO: ▲3.54MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/quick-recommend/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 140 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Quick Recommend: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9313.20 ▼1.371.79 ▲0.0438.37 ▼1.46
Dashboard /wp-admin2,261 ▲615.86 ▼0.11102.53 ▼2.7240.71 ▼2.74
Posts /wp-admin/edit.php2,137 ▲372.06 ▲0.0738.77 ▼1.7836.98 ▼2.49
Add New Post /wp-admin/post-new.php6,711 ▲5,18024.56 ▲1.391,001.88 ▲391.1251.42 ▲0.48
Media Library /wp-admin/upload.php1,437 ▲374.25 ▲0.05103.70 ▲0.6445.94 ▲4.16
Rec. Types /wp-admin/edit-tags.php?taxonomy=rec_type&post_type=recommendation1,3132.1629.0530.67
Options /wp-admin/admin.php?page=qrec_options_admin_page7261.147.0618.69
Recommendations /wp-admin/edit.php?post_type=recommendation1,1172.0038.8429.05
Add Rec. /wp-admin/post-new.php?post_type=recommendation2,7509.56223.4472.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=qrec_options_admin_page
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/quick-recommend/quick-recommend.php on line 1022 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/quick-recommend/quick-recommend.php(1022): do_settings_fields()
    #1 wp-includes/class-wp-hook.php(310): qrec_options_admin_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 42× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/fields/page_link.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/fields/wysiwyg.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/controllers/revisions.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/fields/date_picker/date_picker.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/fields/tab.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/fields/radio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/views/meta_box_location.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/controllers/export.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/fields/google-map.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-recommend/lib/advanced-custom-fields/core/controllers/upgrade.php:25

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)
Everything seems fine on the user side

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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Add New Recommendation screen), #2 (The Quick Recommend selection box, available on posts), #3 (Recommendation displayed at the bottom of a post), #4 (Quick Recommend admin screen)
The official readme.txt might help

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

The primary PHP file in "Quick Recommend" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected37,892 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PO File249,70114,11221,302
PHP454,3754,93610,091
JavaScript72,1261,5944,154
CSS66893792,345

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.44
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods278
▷ Static methods00.00%
▷ Public methods278100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions80
▷ Named functions80100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
21 PNG files occupy 0.57MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_55_5bc6f5_40x100.png0.21KB0.08KB▼ 59.15%
assets/screenshot-2.png28.85KB10.07KB▼ 65.11%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%