89% advanced-button-block

Code Review | Advanced Button Block

WordPress plugin Advanced Button Block scored89%from 54 tests.

About plugin

  • Plugin page: advanced-button-b...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2018
  • Latest release: Jun 26, 2019
  • Number of updates: 9
  • Update frequency: every 27.7 days
  • Top authors: poglaa (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,163 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Advanced Button Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.31 ▼1.93
Dashboard /wp-admin3.31 ▼0.0346.93 ▼14.98
Posts /wp-admin/edit.php3.36 ▲0.0141.87 ▼4.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.01 ▼29.77
Media Library /wp-admin/upload.php3.23 ▲0.0133.70 ▼0.16

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Button Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.21 ▼1.171.84 ▼0.3842.67 ▼15.25
Dashboard /wp-admin2,203 ▲125.80 ▲0.91100.53 ▼3.9439.60 ▼4.60
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0533.27 ▼4.8634.84 ▲0.05
Add New Post /wp-admin/post-new.php6,195 ▲4,67421.97 ▼1.34945.53 ▲343.4265.45 ▲16.62
Media Library /wp-admin/upload.php1,388 ▼04.34 ▲0.0896.04 ▼1.7443.00 ▼1.05

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Gutenberg Advanced Button Adding a Button), #2 (Gutenberg Advanced Button Screenshot)
The official readme.txt is a good inspiration

advanced-button-block/plugin.php 92% from 13 tests

"Advanced Button Block" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-button-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected902 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54824598
Sass3470232
PHP2104731
Markdown115024
JSON10014
CSS3003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin