90% wp-content-blocks

Code Review | Content Blocks

WordPress plugin Content Blocks scored 90% from 54 tests.

About plugin

  • Plugin page: wp-content-blocks
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 6.3.1
  • First release: Aug 15, 2013
  • Latest release: Jul 12, 2018
  • Number of updates: 36
  • Update frequency: every 49.8 days
  • Top authors: diegoliv (50%)wonderboymusic (27.78%)bradparbs (16.67%)ryelle (8.33%)Otto42 (5.56%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 7,091 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.65MB] [CPU: ▼18.70ms] Passed 4 tests

This is a short check of server-side resources used by Content Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.28 ▼7.36
Dashboard /wp-admin3.14 ▼0.1627.45 ▼19.84
Posts /wp-admin/edit.php3.50 ▲0.1546.14 ▼6.13
Add New Post /wp-admin/post-new.php3.35 ▼2.5448.25 ▼41.47
Media Library /wp-admin/upload.php3.22 ▼0.0027.61 ▼5.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Content Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.20 ▼1.192.14 ▲0.0943.01 ▼0.19
Dashboard /wp-admin2,203 ▲154.85 ▼1.03102.77 ▼9.0440.48 ▼5.92
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0639.58 ▼1.1937.57 ▲1.47
Add New Post /wp-admin/post-new.php2,890 ▲1,3484.58 ▼13.42110.02 ▼491.6055.98 ▼4.56
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.06102.26 ▼0.6346.31 ▲1.91

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
No plugin tags provided

wp-content-blocks/content-blocks.php 92% from 13 tests

The entry point to "Content Blocks" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-content-blocks.php" instead of "content-blocks.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,340 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS10321341,251
JavaScript3284200986
SVG400656
PHP1125131447

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
css/images/editor_icons.png4.78KB2.56KB▼ 46.35%