68% easyrecipe

Code Review | EasyRecipe

WordPress plugin EasyRecipe scored68%from 54 tests.

About plugin

  • Plugin page: easyrecipe
  • Plugin version: 3.5.3251
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Mar 28, 2011
  • Latest release: May 18, 2018
  • Number of updates: 200
  • Update frequency: every 13.1 days
  • Top authors: Jayce53 (100%)

Code review

54 tests

User reviews

63 reviews

Install metrics

2,000+ active /255,371 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼2.53ms] Passed 4 tests

An overview of server-side resources used by EasyRecipe
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5745.18 ▲5.24
Dashboard /wp-admin3.86 ▲0.5556.10 ▼1.07
Posts /wp-admin/edit.php3.87 ▲0.5153.13 ▲5.05
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.10 ▼19.34
Media Library /wp-admin/upload.php3.72 ▲0.4941.22 ▲6.30

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 293 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
EasyRecipe
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EasyRecipe
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲10814.38 ▲0.001.68 ▼0.0739.55 ▼2.53
Dashboard /wp-admin2,260 ▲805.74 ▲0.0392.22 ▼1.4878.93 ▲37.00
Posts /wp-admin/edit.php2,177 ▲772.28 ▲0.2645.88 ▲2.5636.41 ▲0.33
Add New Post /wp-admin/post-new.php2,228 ▲70221.54 ▼1.46697.19 ▲21.27195.85 ▲131.42
Media Library /wp-admin/upload.php1,475 ▲754.20 ▼0.04103.04 ▼8.1974.67 ▲29.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/easyrecipe/uninstall.php+9
    fopen(https://www.easyrecipeplugin.com/installed.php?action=uninstall&site=http%3A%2F%2Fwp.com): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easyrecipe/easyrecipe.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 453
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 444
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 487
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 478
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRecipeDOMDocument' not found in wp-content/plugins/easyrecipe/lib/EasyRecipeDocument.php:17
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 371
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 498
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/easyrecipe/lib/EasyRecipeTemplate.php on line 428

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: hrecipe, recipe, microformatting, recipe view, seo...

easyrecipe/easyrecipe.php 92% from 13 tests

The principal PHP file in "EasyRecipe" v. 3.5.3251 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 192 characters long)

Code Analysis 97% from 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 plugin13,742 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
CSS259353856,409
PHP179822,0544,290
HTML311141,0643,031
JavaScript120012

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 154)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity51.25
▷ Minimum class complexity2.00
▷ Maximum class complexity157.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity154.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods171
▷ Static methods105.85%
▷ Public methods14886.55%
▷ Protected methods00.00%
▷ Private methods2313.45%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants35
▷ Global constants00.00%
▷ Class constants35100.00%
▷ Public constants35100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
168 PNG files occupy 0.69MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/style005/images/greystar16.png0.29KB0.24KB▼ 18.24%
formatui/images-1.10.4/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
images/google-dev.png3.35KB0.81KB▼ 75.90%
formatui/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
formatui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%