84% phrankly-food-and-drink-sourcing

Code Review | Phrankly Food & Drink Sourcing

WordPress plugin Phrankly Food & Drink Sourcing scored84%from 54 tests.

About plugin

  • Plugin page: phrankly-food-and...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 5, 2018
  • Latest release: Nov 30, 2018
  • Number of updates: 14
  • Update frequency: every 7.9 days
  • Top authors: deployer (92.86%)bvulaj (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /658 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.65ms] Passed 4 tests

An overview of server-side resources used by Phrankly Food & Drink Sourcing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.83 ▼7.61
Dashboard /wp-admin3.31 ▼0.0349.55 ▼30.26
Posts /wp-admin/edit.php3.37 ▲0.0147.07 ▼2.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.14 ▼10.62
Media Library /wp-admin/upload.php3.24 ▲0.0034.53 ▲1.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Phrankly Food & Drink Sourcing: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.161.62 ▼0.0841.63 ▼2.44
Dashboard /wp-admin2,206 ▲215.85 ▼0.00101.14 ▼0.2839.71 ▼0.87
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0634.26 ▼2.2630.53 ▼4.62
Add New Post /wp-admin/post-new.php1,546 ▲2623.44 ▲0.37708.40 ▲67.8864.20 ▲0.92
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0596.79 ▼1.3842.51 ▼1.87

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/phrankly-food-and-drink-sourcing/phrankly.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: The official readme.txt is a good inspiration

phrankly-food-and-drink-sourcing/phrankly.php 92% from 13 tests

The entry point to "Phrankly Food & Drink Sourcing" version 1.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("phrankly-food-and-drink-sourcing.php" instead of "phrankly.php")

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
No dangerous file extensions were detected31 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18731

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin