83% boilerplate-statement-register

Code Review | Boilerplate Statement Register

WordPress plugin Boilerplate Statement Register scored83%from 54 tests.

About plugin

  • Plugin page: boilerplate-state...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2015
  • Latest release: Sep 20, 2015
  • Number of updates: 12
  • Update frequency: every 3.6 days
  • Top authors: Teruo Morimoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /651 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.00ms] Passed 4 tests

Server-side resources used by Boilerplate Statement Register
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.52 ▲1.66
Dashboard /wp-admin3.32 ▲0.0246.42 ▼9.62
Posts /wp-admin/edit.php3.37 ▲0.0151.07 ▼2.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.30 ▼15.26
Media Library /wp-admin/upload.php3.24 ▲0.0134.46 ▼4.44

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Boilerplate Statement Register: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.01 ▼0.671.89 ▼0.2146.02 ▲1.90
Dashboard /wp-admin2,233 ▲275.78 ▼0.12118.98 ▲2.4741.37 ▼0.57
Posts /wp-admin/edit.php2,124 ▲212.45 ▲0.4148.12 ▲9.2137.60 ▲2.11
Add New Post /wp-admin/post-new.php1,567 ▲4123.53 ▲6.04719.62 ▲57.3639.63 ▼10.39
Media Library /wp-admin/upload.php1,421 ▲244.99 ▲0.75104.66 ▼0.5441.87 ▼6.47

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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
Everything seems fine, however 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/boilerplate-statement-register/boilerplate_statement_register.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Clicking this button, open the main windows.), #2 (Boilerplate statements list is drawing), #3 (Clicking a statement,it is written to the html editor.), #4 (Clicking a trash on a statement, it is deleted.), #5 (Create a new statement. Writing a statement in the textbox, and Clicking the button that is set under the textbox.), #6 (Create a new statement. Selecting a statement in html editor and Open the main window .), #7 (Since a selected statement is copied to the textbox, click the botton for regist.)
The official readme.txt might help

boilerplate-statement-register/boilerplate_statement_register.php 85% from 13 tests

Analyzing the main PHP file in "Boilerplate Statement Register" version 1.0.0
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("boilerplate-statement-register.php" instead of "boilerplate_statement_register.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 detected355 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14849209
CSS112587
PHP1233459

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.61MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/open-in-browser-48.png3.69KB2.33KB▼ 36.76%
screenshot-6.png59.77KB32.92KB▼ 44.92%
images/trash-off.png0.49KB0.64KB0.00%
images/trash-on.png0.27KB0.27KB0.00%
images/trash.png0.27KB0.27KB0.00%