84% foodfindout

Code Review | foodfindout

WordPress plugin foodfindout scored84%from 54 tests.

About plugin

  • Plugin page: foodfindout
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.0
  • WordPress version: 6.3.1
  • First release: Feb 2, 2015
  • Latest release: Jun 3, 2015
  • Number of updates: 11
  • Update frequency: every 11.1 days
  • Top authors: foodfindout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /803 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by foodfindout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.91 ▼5.94
Dashboard /wp-admin3.31 ▲0.0044.85 ▼8.06
Posts /wp-admin/edit.php3.36 ▲0.0043.96 ▲1.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.93 ▼17.90
Media Library /wp-admin/upload.php3.23 ▲0.0033.84 ▲1.71

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

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

Browser metrics Passed 4 tests

foodfindout: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.70 ▲0.401.62 ▼0.2138.87 ▼9.25
Dashboard /wp-admin2,195 ▲185.63 ▼0.0389.93 ▲2.8338.58 ▲1.42
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0138.70 ▼2.0734.84 ▼2.72
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.22658.61 ▲77.5157.60 ▲5.53
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.1195.56 ▼1.6140.66 ▼3.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 144× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Node/Expression/Binary/Add.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_ExtensionInterface' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Extension.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Sandbox_SecurityError' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Sandbox/SecurityNotAllowedTagError.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_Sandbox_SecurityPolicyInterface' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Sandbox/SecurityPolicy.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Function' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Function/Node.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Test/NodeTestCase.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Loader/Chain.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Node/Expression/Test/Even.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Node/Expression/Binary/FloorDiv.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/foodfindout/Twig-1.18.0/lib/Twig/Node/Expression/Binary.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

foodfindout/foodfindout.php Passed 13 tests

Analyzing the main PHP file in "foodfindout" version 1.0.1
44 characters long description:
gets restaurant info from foodfindout server

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected8,499 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1781,8594,9188,325
HTML1300165
reStructuredText1519

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity6.66
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces19
Traits0
Classes158
▷ Abstract classes127.59%
▷ Concrete classes14692.41%
▷ Final classes00.00%
Methods750
▷ Static methods60.80%
▷ Public methods65687.47%
▷ Protected methods9012.00%
▷ Private methods40.53%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants41
▷ Global constants12.44%
▷ Class constants4097.56%
▷ Public constants40100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected