78% comments-disable-accesspress

Code Review | Comments Disable - AccessPress

WordPress plugin Comments Disable - AccessPress scored 78% from 54 tests.

About plugin

  • Plugin page: comments-disable-...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.8.1
  • First release: Apr 17, 2015
  • Latest release: Dec 8, 2021
  • Number of updates: 19
  • Update frequency: every 127.8 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active / 25,720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼161.03ms] Passed 4 tests

This is a short check of server-side resources used by Comments Disable - AccessPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0425.07 ▼10.51
Dashboard /wp-admin3.10 ▲0.0340.42 ▼1.02
Posts /wp-admin/edit.php3.15 ▲0.0435.06 ▼0.87
Add New Post /wp-admin/post-new.php5.46 ▲0.0271.82 ▼631.73
Media Library /wp-admin/upload.php3.04 ▲0.0426.15 ▲1.70
Comments Disable /wp-admin/options-general.php?page=comments-disable-ap3.0223.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 1 new option
New WordPress options
cdap_settings

Browser metrics Passed 4 tests

Comments Disable - AccessPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲6915.91 ▲0.345.59 ▼1.6774.85 ▼7.37
Dashboard /wp-admin2,935 ▲396.09 ▼0.11121.18 ▼11.99172.40 ▼5.20
Posts /wp-admin/edit.php2,745 ▲53.23 ▲0.0064.30 ▲0.50139.55 ▼1.26
Add New Post /wp-admin/post-new.php3,746 ▲319.05 ▲0.14424.65 ▼0.93164.25 ▲5.43
Media Library /wp-admin/upload.php1,754 ▲55.53 ▲0.03142.35 ▼0.12187.80 ▲1.79
Comments Disable /wp-admin/options-general.php?page=comments-disable-ap1,5218.90181.16132.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • cdap_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/comments-disable-accesspress/comments-disable-accesspress.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/comments-disable-accesspress/inc/plugin-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/comments-disable-accesspress/inc/head.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/comments-disable-accesspress/inc/about.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

comments-disable-accesspress/comments-disable-accesspress.php 92% from 13 tests

The entry point to "Comments Disable - AccessPress" version 1.0.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected473 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS1443233
PHP53662218
JavaScript13122

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/googleplus.png1.91KB0.99KB▼ 48.06%
images/flicker.png1.45KB0.57KB▼ 60.47%
images/theme.png52.01KB17.38KB▼ 66.59%
images/customize.png24.05KB8.41KB▼ 65.05%
images/plugin.png12.50KB5.31KB▼ 57.50%