84% recommendations-tastedive

Code Review | Recommendations TasteDive

WordPress plugin Recommendations TasteDive scored84%from 54 tests.

About plugin

  • Plugin page: recommendations-t...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Aug 6, 2018
  • Latest release: Oct 26, 2018
  • Number of updates: 5
  • Update frequency: every 16.2 days
  • Top authors: yugensoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼10.22ms] Passed 4 tests

Analyzing server-side resources used by Recommendations TasteDive
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0846.52 ▲5.41
Dashboard /wp-admin3.40 ▲0.0948.71 ▼25.72
Posts /wp-admin/edit.php3.51 ▲0.1547.16 ▼6.26
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.96 ▼10.54
Media Library /wp-admin/upload.php3.32 ▲0.0940.19 ▲1.66
TasteDive /wp-admin/options-general.php?page=taste-dive-settings3.3032.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_tastedive_cache
New WordPress options
taste_dive_db_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Recommendations TasteDive
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲3814.37 ▲0.091.87 ▼0.1240.01 ▼2.67
Dashboard /wp-admin2,202 ▲225.58 ▼0.0892.36 ▲0.6440.61 ▼6.05
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0339.73 ▼1.9834.53 ▼3.25
Add New Post /wp-admin/post-new.php1,531 ▲523.46 ▼0.15683.39 ▼29.1462.04 ▲7.33
Media Library /wp-admin/upload.php1,401 ▲44.19 ▼0.0097.83 ▼4.0046.13 ▼0.90
TasteDive /wp-admin/options-general.php?page=taste-dive-settings8332.0224.6332.78

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • taste_dive_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/recommendations-tastedive/tests/WikiImageTest.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/recommendations-tastedive/view/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/recommendations-tastedive/view/recommendations.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: authors, games, recommendations, tastedive, movies...

recommendations-tastedive/taste-dive.php 85% from 13 tests

The principal PHP file in "Recommendations TasteDive" v. 1.0.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("recommendations-tastedive.php" instead of "taste-dive.php")

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
Success! There were no dangerous files found in this plugin417 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP798193399
CSS10018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes375.00%
Methods23
▷ Static methods2086.96%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.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 images were found in this plugin