83% flaver-nicotine-shot-calculator

Code Review | Flaver Nicotine Shot Calculator

WordPress plugin Flaver Nicotine Shot Calculator scored 83% from 54 tests.

About plugin

  • Plugin page: flaver-nicotine-s...
  • 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 17, 2020
  • Latest release: Sep 17, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: andyblank (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 386 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: ▼3.15ms] Passed 4 tests

A check of server-side resources used by Flaver Nicotine Shot Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.74 ▲3.13
Dashboard /wp-admin3.31 ▲0.0043.82 ▼3.12
Posts /wp-admin/edit.php3.36 ▲0.0048.89 ▲1.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.52 ▼4.22
Media Library /wp-admin/upload.php3.23 ▲0.0031.77 ▼7.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Flaver Nicotine Shot Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.14 ▼1.421.76 ▲0.0439.29 ▼1.99
Dashboard /wp-admin2,209 ▲244.86 ▲0.0394.66 ▼4.9838.96 ▼2.31
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0140.57 ▲7.4634.58 ▲1.44
Add New Post /wp-admin/post-new.php1,536 ▲1323.28 ▲0.04611.28 ▼34.4146.79 ▼8.96
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.1295.60 ▼2.4642.51 ▼0.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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 everything seems fine, this is not 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
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-nicotine-shot-calculator/flaver-nicshot-calculator.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === flaver-nicotine-shot-calculator === )
You can take inspiration from this readme.txt

flaver-nicotine-shot-calculator/flaver-nicshot-calculator.php 85% from 13 tests

The primary PHP file in "Flaver Nicotine Shot Calculator" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("flaver-nicotine-shot-calculator.php" instead of "flaver-nicshot-calculator.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113838

PHP code Passed 2 tests

This is a very shot 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