10% recipress

Code Review | ReciPress

WordPress plugin ReciPress scored 10% from 54 tests.

About plugin

  • Plugin page: recipress
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.4
  • WordPress version: 6.3.1
  • First release: Nov 15, 2011
  • Latest release: Jun 27, 2012
  • Number of updates: 128
  • Update frequency: every 3.5 days
  • Top authors: tammyhart (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 19,311 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/recipress/php/widgets.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; recipress_terms_widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼49.36ms] Passed 4 tests

This is a short check of server-side resources used by ReciPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.186.30 ▼34.70
Dashboard /wp-admin2.31 ▼1.018.30 ▼39.23
Posts /wp-admin/edit.php2.31 ▼1.0510.46 ▼40.32
Add New Post /wp-admin/post-new.php2.31 ▼3.599.03 ▼83.19
Media Library /wp-admin/upload.php2.31 ▼0.937.35 ▼31.02
Ingredients /wp-admin/edit-tags.php?taxonomy=ingredient2.318.92
Cuisines /wp-admin/edit-tags.php?taxonomy=cuisine2.318.76
Courses /wp-admin/edit-tags.php?taxonomy=course2.318.69
Skill Levels /wp-admin/edit-tags.php?taxonomy=skill_level2.3112.17
ReciPress Options /wp-admin/admin.php?page=recipress_options2.3112.56

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 8 new options
New WordPress options
widget_recipress_recent
theysaidso_admin_options
widget_recent-comments
widget_recipress_terms
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ReciPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲13713.99 ▼0.777.92 ▲5.8952.43 ▲7.00
Dashboard /wp-admin2,245 ▲425.10 ▲0.25109.76 ▼1.0264.08 ▲22.42
Posts /wp-admin/edit.php2,138 ▲462.22 ▲0.2335.68 ▼6.9560.38 ▲21.21
Add New Post /wp-admin/post-new.php7,028 ▲5,49229.16 ▲5.97946.82 ▲248.9575.01 ▲15.03
Media Library /wp-admin/upload.php1,430 ▲484.23 ▼0.0199.60 ▲1.9357.90 ▲16.74
Ingredients /wp-admin/edit-tags.php?taxonomy=ingredient280.440.084.87
Cuisines /wp-admin/edit-tags.php?taxonomy=cuisine280.440.064.11
Courses /wp-admin/edit-tags.php?taxonomy=course280.440.073.99
Skill Levels /wp-admin/edit-tags.php?taxonomy=skill_level280.440.114.69
ReciPress Options /wp-admin/admin.php?page=recipress_options1,1411.8329.1454.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/recipress/php/widgets.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; recipress_terms_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recipress_terms
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recipress_recent
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Deprecated in wp-content/plugins/recipress/php/widgets.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; recipress_terms_widget has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Deprecated in wp-content/plugins/recipress/php/widgets.php+152
    Methods with the same name as their class will not be constructors in a future version of PHP; recipress_recent_widget has a deprecated constructor
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Deprecated in wp-content/plugins/recipress/php/widgets.php+210
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in recipress_terms_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in recipress_recent_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 59 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+294
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+286
    Undefined index: desc
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+293
    Undefined index: id
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+289
    Undefined index: value
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+290
    Undefined index: size
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+291
    Undefined index: options
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=recipress_options
    • > Notice in wp-content/plugins/recipress/php/options.php+372
    Undefined index: default

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recipress/php/taxonomies.php:191
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/recipress/recipress.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/recipress/php/output.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recipress/php/meta_box.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recipress/php/widgets.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recipress/php/options.php:6

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 user-side errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ingredient
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=ingredient - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=cuisine
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=cuisine - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=course
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=course - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=skill_level
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=skill_level - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Add a recipe), #2 (Recipe output - light theme), #3 (Recipe output - dark theme), #4 (Recipe output - ReciPress theme), #5 (ReciPress Options)
You can take inspiration from this readme.txt

recipress/recipress.php Passed 13 tests

"ReciPress" version 1.9.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
89 characters long description:
Create recipes in your posts with a clean interface and layout that are easy to organize.

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
Good job! No executable or dangerous file extensions detected5,194 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PO File81,5062,8943,214
PHP71751871,428
CSS38223456
JavaScript113196

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png4.60KB1.32KB▼ 71.27%
img/sprite.png5.27KB1.93KB▼ 63.41%
img/image.png5.26KB1.50KB▼ 71.60%