84% block-a-saurus

Code Review | Block-a-saurus

WordPress plugin Block-a-saurus scored84%from 54 tests.

About plugin

  • Plugin page: block-a-saurus
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Nov 20, 2020
  • Number of updates: 7
  • Update frequency: every 67.2 days
  • Top authors: alphaparticlecode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Block-a-saurus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.58 ▲0.42
Dashboard /wp-admin3.32 ▲0.0145.72 ▼3.00
Posts /wp-admin/edit.php3.37 ▲0.0148.41 ▲0.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.60 ▼4.35
Media Library /wp-admin/upload.php3.24 ▲0.0137.76 ▼0.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block-a-saurus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.23 ▼0.081.69 ▼0.2747.00 ▼1.94
Dashboard /wp-admin2,206 ▲185.79 ▼0.10114.20 ▲8.6345.22 ▼0.44
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0438.17 ▼1.7632.74 ▼8.24
Add New Post /wp-admin/post-new.php6,183 ▲4,64826.08 ▲2.80904.83 ▲263.2975.75 ▲15.15
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.10117.98 ▲10.1742.77 ▼5.18

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at 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/block-a-saurus/block-a-saurus.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: blockasaurus, block, game, trex, gutenberg

block-a-saurus/block-a-saurus.php 85% from 13 tests

The principal PHP file in "Block-a-saurus" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin8,038 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,027
JavaScript54056591,845
CSS1224123
PHP173243

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
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

All PNG images should be compressed to minimize bandwidth usage for end users
9 compressed PNG files occupy 0.08MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/img/default_100_percent/100-offline-sprite.png2.58KB2.69KB0.00%
src/img/default_200_percent/200-error-offline.png0.26KB0.30KB0.00%
src/img/offline-sprite-2x.png3.04KB3.03KB0.16%
src/img/offline-sprite-1x.png2.46KB2.45KB0.36%
src/img/default_200_percent/200-offline-sprite.png3.17KB3.52KB0.00%