84% cms-blocks

Code Review | CMS Blocks

WordPress plugin CMS Blocks scored84%from 54 tests.

About plugin

  • Plugin page: cms-blocks
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2017
  • Latest release: Oct 4, 2023
  • Number of updates: 8
  • Update frequency: every 292.1 days
  • Top authors: pankaj.sakaria (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /1,118 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.88ms] Passed 4 tests

Analyzing server-side resources used by CMS Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.93 ▼1.48
Dashboard /wp-admin3.33 ▲0.0344.09 ▼7.01
Posts /wp-admin/edit.php3.38 ▲0.0348.92 ▲4.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.02 ▲0.93
Media Library /wp-admin/upload.php3.26 ▲0.0335.63 ▲0.03
All CMS Blocks /wp-admin/edit.php?post_type=cms-block3.3037.70
Add New /wp-admin/post-new.php?post_type=cms-block3.3746.86

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_elsnercmsblock
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for CMS Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.10 ▼1.191.81 ▼0.0141.78 ▼2.14
Dashboard /wp-admin2,236 ▲484.87 ▼1.04106.71 ▼11.3039.70 ▼4.14
Posts /wp-admin/edit.php2,113 ▲241.99 ▼0.0339.69 ▲5.1635.69 ▲0.09
Add New Post /wp-admin/post-new.php1,537 ▲1817.70 ▼5.68608.40 ▼63.7648.02 ▼9.98
Media Library /wp-admin/upload.php1,409 ▲214.18 ▲0.0195.79 ▼3.6641.53 ▼4.07
All CMS Blocks /wp-admin/edit.php?post_type=cms-block1,0971.9430.7727.32
Add New /wp-admin/post-new.php?post_type=cms-block2,1637.58163.5758.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_elsnercmsblock
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cms-blocks/index.php:10

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: block, block content, reusable content, static block, cms block

cms-blocks/index.php 92% from 13 tests

The main file in "CMS Blocks" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cms-blocks.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin144 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1239144

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin