72% ajax-comment-form-cst

Code Review | Ajax Comment Form CST

WordPress plugin Ajax Comment Form CST scored72%from 54 tests.

About plugin

  • Plugin page: ajax-comment-form...
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2019
  • Latest release: Sep 20, 2019
  • Number of updates: 25
  • Update frequency: every 3.2 days
  • Top authors: rafe007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /846 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
This plugin's installer ran successfully

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

A check of server-side resources used by Ajax Comment Form CST
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.71 ▼3.71
Dashboard /wp-admin3.36 ▲0.0145.16 ▼14.91
Posts /wp-admin/edit.php3.47 ▲0.1148.99 ▲4.87
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.53 ▼13.86
Media Library /wp-admin/upload.php3.28 ▲0.0536.17 ▼0.99
ACForm CST /wp-admin/options-general.php?page=acform_cst_settings3.2528.88

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax Comment Form CST
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.74 ▲0.361.73 ▼0.0240.96 ▲0.95
Dashboard /wp-admin2,213 ▲284.85 ▼1.12108.73 ▲3.9338.80 ▼2.95
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0436.05 ▼0.7332.53 ▼2.46
Add New Post /wp-admin/post-new.php1,517 ▼1617.45 ▼5.67661.67 ▼33.7852.57 ▼2.60
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.0895.76 ▼15.6043.49 ▼5.12
ACForm CST /wp-admin/options-general.php?page=acform_cst_settings9092.0523.0331.01

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=acform_cst_settings
    • > Notice in wp-content/plugins/ajax-comment-form-cst/acform-cst-settings.php+112
    Undefined index: captcha

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ajax-comment-form-cst/captcha/php_captcha.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ajax-comment-form-cst/acform-cst.php:32
    • > PHP Notice
      Undefined variable: acform_cst_settings in wp-content/plugins/ajax-comment-form-cst/lib/acform-cst-class.php on line 103
    • > PHP Notice
      Undefined variable: fgcolorhex in wp-content/plugins/ajax-comment-form-cst/captcha/captcha.class.php on line 42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ajax-comment-form-cst/acform-cst-settings.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-comment-form-cst/lib/acform-cst-class.php:17

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 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
10 plugin tags: ajax form, comment form, comment block, ajax comment form, plt...

ajax-comment-form-cst/acform-cst.php 85% from 13 tests

The main PHP file in "Ajax Comment Form CST" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ajax-comment-form-cst.php" instead of "acform-cst.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected671 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8117123528
JavaScript12441143

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.80
▷ Minimum class complexity5.00
▷ Maximum class complexity31.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods2993.55%
▷ Protected methods26.45%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png7.76KB3.54KB▼ 54.47%
images/plugin_logo.png2.34KB2.40KB0.00%