84% foodparser

Code Review | FoodParser

WordPress plugin FoodParser scored84%from 54 tests.

About plugin

  • Plugin page: foodparser
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Jul 25, 2016
  • Number of updates: 12
  • Update frequency: every 4.4 days
  • Top authors: foodparsed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /893 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.37ms] Passed 4 tests

A check of server-side resources used by FoodParser
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.83 ▼4.78
Dashboard /wp-admin3.31 ▼0.0341.39 ▼18.91
Posts /wp-admin/edit.php3.37 ▲0.0148.66 ▲1.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.07 ▼15.39
Media Library /wp-admin/upload.php3.24 ▲0.0133.04 ▼2.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for FoodParser
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.28 ▼1.105.31 ▲3.4942.59 ▼2.49
Dashboard /wp-admin2,203 ▲154.88 ▼0.00110.89 ▼0.0043.07 ▼2.26
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0440.46 ▲2.0234.72 ▲1.02
Add New Post /wp-admin/post-new.php1,521 ▲223.08 ▼0.27665.41 ▲3.9262.39 ▼0.77
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0593.34 ▼19.2540.40 ▼7.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/foodparser/foodparser-add-button.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === foodparser === )
You can take inspiration from this readme.txt

foodparser/foodparser-add-button.php 92% from 13 tests

The main PHP file in "FoodParser" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("foodparser.php" instead of "foodparser-add-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin310 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript175248
CSS12034
PHP1132428

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
foodparser-pear.png6.44KB6.76KB0.00%