84% simple-coherent-form

Code Review | Simple Coherent Form

WordPress plugin Simple Coherent Form scored84%from 54 tests.

About plugin

  • Plugin page: simple-coherent-form
  • Plugin version: 1.3.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2023
  • Latest release: Nov 30, 2023
  • Number of updates: 15
  • Update frequency: every 16.3 days
  • Top authors: tombgtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.44MB] [CPU: ▲0.75ms] Passed 4 tests

A check of server-side resources used by Simple Coherent Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4644.60 ▲4.03
Dashboard /wp-admin4.76 ▲1.4155.16 ▼3.65
Posts /wp-admin/edit.php4.81 ▲1.4556.32 ▲5.69
Add New Post /wp-admin/post-new.php7.32 ▲1.4396.37 ▼3.07
Media Library /wp-admin/upload.php4.68 ▲1.4542.77 ▲13.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Simple Coherent Form: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3014.70 ▲0.461.59 ▼0.2239.15 ▼4.72
Dashboard /wp-admin2,195 ▲155.59 ▼0.0994.71 ▼7.9941.99 ▲0.35
Posts /wp-admin/edit.php2,103 ▲61.94 ▼0.0338.53 ▲1.4535.90 ▲0.62
Add New Post /wp-admin/post-new.php1,526 ▼123.63 ▲0.29619.71 ▲20.8950.00 ▲3.15
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.1396.18 ▼2.3441.92 ▼0.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SCF\\Plugins\\add_filter() in wp-content/plugins/simple-coherent-form/plugins/cf7.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

simple-coherent-form/simple-coherent-form.php Passed 13 tests

The main PHP script in "Simple Coherent Form" version 1.3.4 is automatically included on every request by WordPress
48 characters long description:
Create coherent input between themes and plugins

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,356 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP181,0261,2843,717
JavaScript67528522,857
CSS23891642,461
PO File1133143320
JSON1001

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 494)
Cyclomatic complexity
Average complexity per logical line of code0.86
Average class complexity99.81
▷ Minimum class complexity14.00
▷ Maximum class complexity612.00
Average method complexity10.36
▷ Minimum method complexity1.00
▷ Maximum method complexity494.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods150
▷ Static methods96.00%
▷ Public methods14798.00%
▷ Protected methods00.00%
▷ Private methods32.00%
Functions18
▷ Named functions211.11%
▷ Anonymous functions1688.89%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.18MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flags-4.png119.01KB125.30KB0.00%
assets/img/flags-2.png44.80KB47.08KB0.00%
assets/img/flags.png21.11KB22.31KB0.00%