83% ajaxcomments

Code Review | wordpressAjaxComments

WordPress plugin wordpressAjaxComments scored83%from 54 tests.

About plugin

  • Plugin page: ajaxcomments
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Nov 4, 2015
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: heiglandreas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by wordpressAjaxComments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.72 ▼0.33
Dashboard /wp-admin3.36 ▲0.0144.27 ▼18.17
Posts /wp-admin/edit.php3.41 ▲0.0547.00 ▲4.46
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.07 ▼23.22
Media Library /wp-admin/upload.php3.28 ▲0.0533.79 ▼2.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by wordpressAjaxComments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.48 ▼1.118.80 ▲7.1743.88 ▼1.64
Dashboard /wp-admin2,195 ▲185.51 ▼0.1781.23 ▼21.4041.07 ▼1.99
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0439.42 ▼0.7934.63 ▼1.82
Add New Post /wp-admin/post-new.php1,526 ▼1123.08 ▲4.94637.93 ▼25.7154.91 ▼13.55
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.0595.69 ▼20.3645.34 ▼2.31

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Org_Heigl\\Wordpress\\AjaxComment\\Validator\\ValidatorInterface' not found in wp-content/plugins/ajaxcomments/src/Validator/UsernameFieldValidator.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajaxcomments/index.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Org_Heigl\\Wordpress\\AjaxComment\\Validator\\ValidatorInterface' not found in wp-content/plugins/ajaxcomments/src/Validator/EmailFieldValidator.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Org_Heigl\\Wordpress\\AjaxComment\\Validator\\ValidatorInterface' not found in wp-content/plugins/ajaxcomments/src/Validator/CommentFieldValidator.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: inline error, ajax, comments, comment

ajaxcomments/index.php 69% from 13 tests

"wordpressAjaxComments" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to 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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ajaxcomments.php" instead of "index.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin398 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1473291287
JavaScript14871
Markdown19023
CSS13317

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.54
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods969.23%
▷ Protected methods430.77%
▷ Private methods00.00%
Functions0
▷ Named functions00.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