10% easy-block-selector

Code Review | Easy Block Selector

WordPress plugin Easy Block Selector scored10%from 54 tests.

About plugin

  • Plugin page: easy-block-selector
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: Jan 12, 2015
  • Number of updates: 5
  • Update frequency: every 122.4 days
  • Top authors: sekishi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /924 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/easy-block-selector/easy-block-selector-button.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyBlockSelector has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.14ms] Passed 4 tests

This is a short check of server-side resources used by Easy Block Selector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.18 ▲3.67647,498.71 ▲647,455.01
Dashboard /wp-admin2.08 ▼1.277.01 ▼48.89
Posts /wp-admin/edit.php2.08 ▼1.324.85 ▼47.69
Add New Post /wp-admin/post-new.php2.08 ▼3.855.66 ▼87.25
Media Library /wp-admin/upload.php2.08 ▼1.195.91 ▼32.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Block Selector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.36 ▼0.021.77 ▼0.0844.29 ▼3.79
Dashboard /wp-admin2,198 ▲215.66 ▲0.0586.65 ▼5.2539.05 ▼3.84
Posts /wp-admin/edit.php2,100 ▲31.98 ▲0.0236.41 ▼2.2738.00 ▲2.03
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.05686.21 ▲53.7655.28 ▼0.14
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.00108.59 ▲4.6450.63 ▲7.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/easy-block-selector/easy-block-selector-button.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyBlockSelector has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 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/easy-block-selector/easy-block-selector-button.php:67

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: tinymce, short code, select, editor, shortcodes...

easy-block-selector/easy-block-selector-button.php 92% from 13 tests

The entry point to "Easy Block Selector" version 0.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-block-selector.php" instead of "easy-block-selector-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin277 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11133237
PHP1221440

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tinymce3/ebs_mce_icon.png2.86KB0.13KB▼ 95.29%