84% simple-code-block

Code Review | Simple Code Block

WordPress plugin Simple Code Block scored84%from 54 tests.

About plugin

  • Plugin page: simple-code-block
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Jan 8, 2020
  • Number of updates: 14
  • Update frequency: every 36.9 days
  • Top authors: pablocianes (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /7,458 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
Install script ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼15.64ms] Passed 4 tests

This is a short check of server-side resources used by Simple Code Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.83 ▼5.98
Dashboard /wp-admin3.36 ▲0.0148.32 ▼18.39
Posts /wp-admin/edit.php3.47 ▲0.1148.05 ▼0.14
Add New Post /wp-admin/post-new.php4.87 ▼1.0252.68 ▼38.04
Media Library /wp-admin/upload.php3.28 ▲0.0532.23 ▲1.43

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 90 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Code Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.071.77 ▼0.3045.34 ▲1.26
Dashboard /wp-admin2,192 ▲185.62 ▼0.0387.16 ▼12.5636.47 ▼6.40
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0933.19 ▼5.6535.17 ▼1.24
Add New Post /wp-admin/post-new.php6,468 ▲4,94029.82 ▲6.68921.72 ▲309.3862.88 ▲8.84
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.04101.48 ▼6.4743.45 ▲0.63

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/simple-code-block/core/index.php on line 1
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/simple-code-block/index.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: block, gutenberg, ace, syntax highlighting, code...

simple-code-block/simple-code-block.php Passed 13 tests

The main PHP file in "Simple Code Block" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
A simple block to insert code into Gutenberg.

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
No dangerous file extensions were detected1,157 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript768025949
PHP692418191
Sass30017
CSS20230

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods1875.00%
▷ Protected methods14.17%
▷ Private methods520.83%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin