78% isw-blocks

Code Review | iSoftware Blocks

WordPress plugin iSoftware Blocks scored78%from 54 tests.

About plugin

  • Plugin page: isw-blocks
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Nov 14, 2013
  • Latest release: Aug 29, 2014
  • Number of updates: 14
  • Update frequency: every 28.4 days
  • Top authors: isoftware (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /4,310 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.25MB] [CPU: ▼1.83ms] Passed 4 tests

An overview of server-side resources used by iSoftware Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2443.44 ▲3.80
Dashboard /wp-admin3.56 ▲0.2655.16 ▲8.88
Posts /wp-admin/edit.php3.67 ▲0.3249.01 ▼7.09
Add New Post /wp-admin/post-new.php6.14 ▲0.2693.56 ▼8.54
Media Library /wp-admin/upload.php3.48 ▲0.2641.69 ▲4.50
Add New /wp-admin/post-new.php?post_type=block3.6153.16
Settings /wp-admin/edit.php?post_type=block&page=settings3.4342.80
Blocks /wp-admin/edit.php?post_type=block3.5342.93
Regions /wp-admin/edit-tags.php?taxonomy=block_region&post_type=block3.4837.20

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_isw_block_widget
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by iSoftware Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.28 ▼1.021.86 ▼0.0343.26 ▲2.03
Dashboard /wp-admin2,244 ▲565.78 ▲0.87114.39 ▲7.6642.64 ▼3.38
Posts /wp-admin/edit.php2,127 ▲381.99 ▼0.0234.91 ▼6.0833.76 ▼4.93
Add New Post /wp-admin/post-new.php1,546 ▲1323.17 ▲0.09669.38 ▼9.0956.78 ▼9.01
Media Library /wp-admin/upload.php1,420 ▲324.25 ▲0.01100.99 ▼7.9044.50 ▼0.83
Add New /wp-admin/post-new.php?post_type=block2,3627.62173.1070.34
Settings /wp-admin/edit.php?post_type=block&page=settings9832.1824.0330.25
Blocks /wp-admin/edit.php?post_type=block1,1071.9331.0531.09
Regions /wp-admin/edit-tags.php?taxonomy=block_region&post_type=block1,3032.1427.2430.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_isw_block_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=block&page=settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=block&page=settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/isw-blocks/isw-blocks.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/isw-blocks/classes/class-isw-blocks.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'ISWOptionsPage' not found in wp-content/plugins/isw-blocks/classes/class-isw-block-options-page.php:9

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 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === isw-blocks === )
  • Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (The Settings Page), #2 (The Block Management Page), #3 (The Block Edit Page), #4 (The Widgets Page)
Please take inspiration from this readme.txt

isw-blocks/isw-blocks.php Passed 13 tests

Analyzing the main PHP file in "iSoftware Blocks" version 1.2.1
64 characters long description:
This plugin lets you create your own reusable blocks of content.

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
Success! There were no dangerous files found in this plugin1,696 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP52651231,020
PO File2149164360
CSS3378286
JavaScript16018
SVG10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity33.20
▷ Minimum class complexity3.00
▷ Maximum class complexity78.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods54
▷ Static methods23.70%
▷ Public methods3564.81%
▷ Protected methods1527.78%
▷ Private methods47.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
12 PNG files occupy 0.24MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon16.png0.42KB0.35KB▼ 15.02%
screenshot-3.png70.12KB31.08KB▼ 55.68%
img/menu.png0.64KB0.53KB▼ 17.25%
screenshot-2.png59.10KB24.68KB▼ 58.23%
img/menu-2x.png1.85KB1.60KB▼ 13.52%