84% commentcode-api

Code Review | Commentcode API

WordPress plugin Commentcode API scored84%from 54 tests.

About plugin

  • Plugin page: commentcode-api
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.0
  • WordPress version: 6.3.1
  • First release: Dec 17, 2016
  • Latest release: Dec 21, 2016
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: miunosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼12.20ms] Passed 4 tests

Analyzing server-side resources used by Commentcode API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.38 ▼4.42
Dashboard /wp-admin3.36 ▲0.0144.73 ▼15.21
Posts /wp-admin/edit.php3.48 ▲0.1247.17 ▲0.94
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.28 ▼24.86
Media Library /wp-admin/upload.php3.29 ▲0.0531.03 ▼4.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Commentcode API
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.59 ▼1.004.74 ▲2.8244.32 ▼0.17
Dashboard /wp-admin2,203 ▲125.83 ▲0.90105.58 ▲4.1038.31 ▼6.61
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0339.06 ▲1.6636.75 ▲5.70
Add New Post /wp-admin/post-new.php1,533 ▼023.12 ▼0.02576.25 ▼105.7552.90 ▼4.20
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.0694.45 ▲0.4243.01 ▲0.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • 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)
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'CommentcodeAPI_Parser_Base' not found in wp-content/plugins/commentcode-api/include/main/CommentcodeAPI_Parser_SelfClosing.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CommentcodeAPI_Parser_Base' not found in wp-content/plugins/commentcode-api/include/main/CommentcodeAPI_Parser_Enclosing.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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: shortcode, html comments, commentcode, api

commentcode-api/commentcode-api.php Passed 13 tests

Analyzing the main PHP file in "Commentcode API" version 1.0.0
28 characters long description:
A shortcode alternative API.

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 detected396 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP867266275
Markdown1530121

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes112.50%
Methods23
▷ Static methods417.39%
▷ Public methods1356.52%
▷ Protected methods834.78%
▷ Private methods28.70%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.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