84% flaver-cbd-calculator

Code Review | Flaver CBD Calculator

WordPress plugin Flaver CBD Calculator scored84%from 54 tests.

About plugin

  • Plugin page: flaver-cbd-calcul...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2020
  • Latest release: Sep 18, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: andyblank (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by Flaver CBD Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.97 ▼3.19
Dashboard /wp-admin3.31 ▲0.0046.62 ▼5.36
Posts /wp-admin/edit.php3.36 ▲0.0046.56 ▼2.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.11 ▼7.35
Media Library /wp-admin/upload.php3.23 ▲0.0034.59 ▲1.80

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Flaver CBD Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.45 ▲0.021.79 ▼0.0340.94 ▼4.60
Dashboard /wp-admin2,206 ▲185.86 ▲1.00107.28 ▼3.5440.27 ▼2.70
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0238.82 ▼2.1833.63 ▼1.05
Add New Post /wp-admin/post-new.php1,514 ▼317.60 ▲0.11588.72 ▼67.4450.53 ▲4.36
Media Library /wp-admin/upload.php1,382 ▼94.21 ▼0.0597.35 ▼3.5740.73 ▼4.49

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/flaver-cbd-calculator/flaver-cbd-calculator.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === flaver-cbd-calculator === )
The official readme.txt is a good inspiration

flaver-cbd-calculator/flaver-cbd-calculator.php Passed 13 tests

The main PHP file in "Flaver CBD Calculator" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
91 characters long description:
Shortcode: [flaver-cbd-calculator] Displays a simple vaping CBD calculator on your webpage.

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
Good job! No executable or dangerous file extensions detected41 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP119841

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin