84% mrm-recipes

Code Review | MyRecipeMagic Plugin

WordPress plugin MyRecipeMagic Plugin scored84%from 54 tests.

About plugin

  • Plugin page: mrm-recipes
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Jan 3, 2018
  • Number of updates: 26
  • Update frequency: every 4.5 days
  • Top authors: rebelmouse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by MyRecipeMagic Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0846.39 ▲2.61
Dashboard /wp-admin3.38 ▲0.0746.97 ▼3.96
Posts /wp-admin/edit.php3.43 ▲0.0751.32 ▲1.10
Add New Post /wp-admin/post-new.php5.96 ▲0.0793.62 ▲3.89
Media Library /wp-admin/upload.php3.30 ▲0.0737.68 ▼1.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by MyRecipeMagic Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.32 ▼1.052.13 ▲0.2341.51 ▲0.96
Dashboard /wp-admin2,227 ▲394.86 ▼1.04109.88 ▲2.3941.26 ▼1.83
Posts /wp-admin/edit.php2,112 ▲232.01 ▲0.0140.56 ▲2.0139.88 ▲8.48
Add New Post /wp-admin/post-new.php1,556 ▲3723.18 ▼0.13665.72 ▼4.3852.03 ▼3.23
Media Library /wp-admin/upload.php1,412 ▲244.25 ▼0.0699.34 ▼15.7046.05 ▼3.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mrm-recipes/mrm_recipes.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% 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
2 plugin tags: food, recipes

mrm-recipes/mrm_recipes.php 92% from 13 tests

The main file in "MyRecipeMagic Plugin" v. 1.4.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mrm-recipes.php" instead of "mrm_recipes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin351 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19571343
CSS1108

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
5 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/magic-button2x.png12.92KB4.08KB▼ 68.39%
images/chef_icon.png1.50KB0.84KB▼ 43.68%
assets/icon-256x256.png10.47KB4.22KB▼ 59.70%
assets/icon-128x128.png4.81KB2.54KB▼ 47.08%
assets/screenshot-1.png29.30KB9.85KB▼ 66.37%