72% visual-recipe-index

Code Review | Visual Recipe Index

WordPress plugin Visual Recipe Index scored 72% from 54 tests.

About plugin

  • Plugin page: visual-recipe-index
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 5.8.1
  • First release: May 3, 2014
  • Latest release: Feb 26, 2015
  • Number of updates: 21
  • Update frequency: every 14.3 days
  • Top authors: seestheday (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active / 8,844 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼139.15ms] Passed 4 tests

This is a short check of server-side resources used by Visual Recipe Index
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1842.01 ▲21.53
Dashboard /wp-admin3.19 ▲0.1447.15 ▲3.03
Posts /wp-admin/edit.php3.30 ▲0.2045.72 ▲6.78
Add New Post /wp-admin/post-new.php5.55 ▲0.1288.19 ▼568.24
Media Library /wp-admin/upload.php3.13 ▲0.1331.44 ▲1.85
Visual Recipe Index /wp-admin/options-general.php?page=visual-recipe-index3.1129.96

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options
riview

Browser metrics Passed 4 tests

A check of browser resources used by Visual Recipe Index
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲12015.83 ▼0.028.29 ▲0.2848.16 ▼4.84
Dashboard /wp-admin2,978 ▲445.83 ▼0.08140.92 ▲3.51110.12 ▼10.80
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0068.23 ▲1.2496.52 ▲3.79
Add New Post /wp-admin/post-new.php1,686 ▲318.70 ▼0.09368.62 ▼12.38109.71 ▼2.29
Media Library /wp-admin/upload.php1,738 ▼694.97 ▼0.06144.50 ▼2.61119.98 ▼4.72
Visual Recipe Index /wp-admin/options-general.php?page=visual-recipe-index1,2712.3856.4287.88

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
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • riview

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/visual-recipe-index/includes/RecipeIndexData.php
    • > /wp-content/plugins/visual-recipe-index/includes/RecipeIndexPost.php
    • > /wp-content/plugins/visual-recipe-index/includes/RecipeIndexView.php
    • > /wp-content/plugins/visual-recipe-index/visual-recipe-index.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/visual-recipe-index/includes/Options.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=visual-recipe-index
    • > Network (severe)
    wp-content/plugins/visual-recipe-index/includes/Sign-up.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=visual-recipe-index
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: $j(...).fix_radios is not a function" "TypeError: $j(...).fix_radios is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/visual-recipe-index/js/recipe_index_options.js?ver=5.8.1:28:29)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=visual-recipe-index
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: $j(...).fix_radios is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #3 (Full screen view of the visual recipe index.) image missing
The official readme.txt is a good inspiration

visual-recipe-index/visual-recipe-index.php Passed 13 tests

The principal PHP file in "Visual Recipe Index" v. 1.2.8 is loaded by WordPress automatically on each request
59 characters long description:
This plugin allows for the easy creation of a recipe index.

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
Success! There were no dangerous files found in this plugin1,200 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP72741,264774
CSS34338223
JavaScript2215203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity58.25
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity5.77
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods48
▷ Static methods36.25%
▷ Public methods1225.00%
▷ Protected methods3062.50%
▷ Private methods612.50%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants52
▷ Global constants52100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ie6/borderTopRight.png0.45KB0.53KB0.00%
css/images/ie6/borderBottomLeft.png0.46KB0.53KB0.00%
css/images/ie6/borderMiddleLeft.png0.14KB0.16KB0.00%
css/images/border2.png0.17KB0.16KB▼ 2.35%
css/images/ie6/borderBottomCenter.png0.15KB0.18KB0.00%