83% loomisoft-content-blocks

Code Review | Reusable Content & Text Blocks by Loomisoft

WordPress plugin Reusable Content & Text Blocks by Loomisoftscored 83% from 54 tests.

About plugin

  • Plugin page: loomisoft-content...
  • Plugin version: 1.4.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 5.9.2
  • First release: Nov 9, 2016
  • Latest release: Sep 29, 2018
  • Number of updates: 47
  • Update frequency: every 14.7 days
  • Top authors: loomisoft (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

4,000+ active / 23,114 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 gracefully, with no errors

Server metrics [RAM: ▼0.04MB] [CPU: ▼312.45ms] Passed 4 tests

A check of server-side resources used by Reusable Content & Text Blocks by Loomisoft
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.4663.36 ▲13.56
Dashboard /wp-admin3.56 ▲0.1434.13 ▲1.34
Posts /wp-admin/edit.php3.66 ▲0.0236.22 ▼2.91
Add New Post /wp-admin/post-new.php6.34 ▼0.6383.35 ▼1,251.54
Media Library /wp-admin/upload.php3.62 ▲0.3228.22 ▲3.33
Add New Content Block /wp-admin/post-new.php?post_type=lscontentblock3.8350.78
All Content Blocks /wp-admin/edit.php?post_type=lscontentblock3.6531.41
Usage & About /wp-admin/edit.php?post_type=lscontentblock&page=ls_cb_usage_about_page3.5430.66

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 2 new options
New WordPress options
ls_cb_option
widget_ls_content_block

Browser metrics Passed 4 tests

An overview of browser requirements for Reusable Content & Text Blocks by Loomisoft
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,940 ▲18616.18 ▲0.955.95 ▼0.762.18 ▼0.49
Dashboard /wp-admin3,065 ▲2047.07 ▲0.91120.06 ▼12.04219.40 ▲53.93
Posts /wp-admin/edit.php2,862 ▲1713.24 ▼0.0070.62 ▲6.69186.26 ▲38.80
Add New Post /wp-admin/post-new.php1,796 ▲13616.50 ▲0.46392.72 ▼17.83163.11 ▲10.69
Media Library /wp-admin/upload.php1,867 ▲1726.16 ▲0.66125.44 ▼12.89244.33 ▲60.52
Add New Content Block /wp-admin/post-new.php?post_type=lscontentblock3,27010.04204.33282.38
All Content Blocks /wp-admin/edit.php?post_type=lscontentblock1,6043.5365.01161.61
Usage & About /wp-admin/edit.php?post_type=lscontentblock&page=ls_cb_usage_about_page1,9543.3162.33178.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 2 options
    • widget_ls_content_block
    • ls_cb_option

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lscontentblock&page=ls_cb_usage_about_page
    • > User deprecated in wp-includes/functions.php+5691
    contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/post-new.php?post_type=lscontentblock
    • > Notice in wp-content/plugins/loomisoft-content-blocks/includes/ls_cb_main.php+481
    Undefined offset: 16
    • > GET request to /wp-admin/post-new.php?post_type=lscontentblock
    • > Notice in wp-content/plugins/loomisoft-content-blocks/includes/ls_cb_main.php+481
    Undefined offset: 17
    • > GET request to /wp-admin/post-new.php?post_type=lscontentblock
    • > Notice in wp-content/plugins/loomisoft-content-blocks/includes/ls_cb_main.php+481
    Undefined offset: 18
    • > GET request to /wp-admin/post-new.php?post_type=lscontentblock
    • > Notice in wp-content/plugins/loomisoft-content-blocks/includes/ls_cb_main.php+481
    Undefined offset: 19

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (18 tag instead of maximum 10)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Reusable Content & Text Blocks by Loomisoft=== )
You can take inspiration from this readme.txt

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

The entry point to "Reusable Content & Text Blocks by Loomisoft" version 1.4.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 513 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,326 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5191691,005
CSS1384220
JavaScript2178101

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity67.00
▷ Minimum class complexity19.00
▷ Maximum class complexity115.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods3788.10%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.10MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ls-wp-mce-icon.png20.80KB0.67KB▼ 96.78%
images/ls-wp-menu-icon.png19.81KB0.46KB▼ 97.67%
images/ls-wp-admin-branding.png65.37KB2.53KB▼ 96.13%