84% repeated-blocks

Code Review | Repeated Blocks

WordPress plugin Repeated Blocks scored84%from 54 tests.

About plugin

  • Plugin page: repeated-blocks
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 18, 2018
  • Latest release: Apr 18, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kbxian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /554 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.04MB] [CPU: ▼5.98ms] Passed 4 tests

This is a short check of server-side resources used by Repeated Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.01 ▼0.28
Dashboard /wp-admin3.34 ▲0.0450.43 ▼3.66
Posts /wp-admin/edit.php3.39 ▲0.0452.63 ▲4.83
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.38 ▼21.44
Media Library /wp-admin/upload.php3.27 ▲0.0439.19 ▲1.45
Blocks /wp-admin/edit.php?post_type=xb-blocks3.3139.83
Add New /wp-admin/post-new.php?post_type=xb-blocks3.3951.63

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Repeated Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3514.67 ▲0.321.87 ▲0.1443.35 ▲3.17
Dashboard /wp-admin2,224 ▲495.56 ▼0.1588.23 ▼17.1844.06 ▼1.52
Posts /wp-admin/edit.php2,130 ▲301.95 ▼0.0836.45 ▼0.2736.03 ▲0.48
Add New Post /wp-admin/post-new.php1,552 ▲2623.13 ▲0.14683.63 ▲4.6658.08 ▲5.61
Media Library /wp-admin/upload.php1,430 ▲304.23 ▲0.04111.79 ▼1.5947.73 ▲0.64
Blocks /wp-admin/edit.php?post_type=xb-blocks1,0941.9334.1531.41
Add New /wp-admin/post-new.php?post_type=xb-blocks2,1917.71171.5469.62

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

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)
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/repeated-blocks/xian_block.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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: visualcomposer, blocks, repeat, repeated, vc

repeated-blocks/xian_block.php 85% from 13 tests

The entry point to "Repeated Blocks" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("repeated-blocks.php" instead of "xian_block.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin117 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1363998
JavaScript13019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin