84% bamazoo-button-generator

Code Review | Bamazoo - Button Generator

WordPress plugin Bamazoo - Button Generator scored84%from 54 tests.

About plugin

  • Plugin page: bamazoo-button-ge...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2017
  • Latest release: Sep 13, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: bamazoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Bamazoo - Button Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.65 ▼0.00
Dashboard /wp-admin3.31 ▲0.0145.99 ▼4.26
Posts /wp-admin/edit.php3.36 ▲0.0142.84 ▼5.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.44 ▼10.92
Media Library /wp-admin/upload.php3.23 ▲0.0034.04 ▼1.40

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bamazoo - Button Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.64 ▼1.001.61 ▼0.4539.97 ▼11.29
Dashboard /wp-admin2,209 ▲184.88 ▼0.21113.48 ▲8.8342.11 ▼5.33
Posts /wp-admin/edit.php2,092 ▼02.03 ▼0.0035.61 ▼4.7829.68 ▼8.29
Add New Post /wp-admin/post-new.php1,532 ▲423.15 ▲4.81643.54 ▼9.2057.56 ▲5.81
Media Library /wp-admin/upload.php1,388 ▲64.20 ▲0.0096.24 ▲0.6342.06 ▲0.45

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 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/bamazoo-button-generator/bamazoo-Button-Generator.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === bamazoo-button-generator === )
The official readme.txt might help

bamazoo-button-generator/bamazoo-Button-Generator.php 92% from 13 tests

The primary PHP file in "Bamazoo - Button Generator" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bamazoo-button-generator.php" instead of "bamazoo-Button-Generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172222

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin