78% foodspace-recipe

Code Review | Foodspace Recipe Widget

WordPress plugin Foodspace Recipe Widget scored78%from 54 tests.

About plugin

  • Plugin page: foodspace-recipe
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 2, 2019
  • Latest release: Jul 9, 2019
  • Number of updates: 11
  • Update frequency: every 9.0 days
  • Top authors: foodspacedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼11.18ms] Passed 4 tests

A check of server-side resources used by Foodspace Recipe Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.93 ▼4.50
Dashboard /wp-admin3.37 ▲0.0347.59 ▼18.88
Posts /wp-admin/edit.php3.49 ▲0.1347.51 ▼3.36
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.27 ▼17.97
Media Library /wp-admin/upload.php3.30 ▲0.0737.35 ▲1.06

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Foodspace Recipe Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲19113.95 ▼0.456.17 ▲4.3237.17 ▼8.21
Dashboard /wp-admin2,222 ▲185.83 ▼0.09100.90 ▼10.2039.28 ▼6.58
Posts /wp-admin/edit.php2,101 ▲42.04 ▲0.0234.94 ▼1.3532.29 ▼1.86
Add New Post /wp-admin/post-new.php1,530 ▼123.16 ▼0.12663.13 ▼19.5648.82 ▲0.89
Media Library /wp-admin/upload.php1,404 ▲14.29 ▲0.02105.88 ▲5.2148.76 ▲1.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/foodspace-recipe/public/partials/food-space-recipe-plugin-public-display.php
    • > /wp-content/plugins/foodspace-recipe/admin/partials/food-space-recipe-plugin-admin-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/foodspace-recipe/public/class-food-space-recipe-plugin-public.php:254

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === foodspace-recipe === )
You can take inspiration from this readme.txt

foodspace-recipe/food-space-recipe-plugin.php 85% from 13 tests

The main file in "Foodspace Recipe Widget" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • 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 ("foodspace-recipe.php" instead of "food-space-recipe-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected315 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12134535309
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods1236.36%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin