84% allow-comments-on-pages-by-default

Code Review | Allow Comments on Pages by Default

WordPress plugin Allow Comments on Pages by Default scored 84% from 54 tests.

About plugin

  • Plugin page: allow-comments-on...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Aug 26, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: SergeyBiryukov (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 4,468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.61ms] Passed 4 tests

An overview of server-side resources used by Allow Comments on Pages by Default
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.21 ▼7.90
Dashboard /wp-admin3.31 ▲0.0148.25 ▼2.19
Posts /wp-admin/edit.php3.36 ▲0.0146.63 ▲2.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.84 ▼3.88
Media Library /wp-admin/upload.php3.23 ▲0.0038.84 ▼4.48

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Allow Comments on Pages by Default
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.21 ▼1.181.69 ▼0.2340.24 ▼5.43
Dashboard /wp-admin2,206 ▲295.88 ▲0.8998.31 ▼4.8436.76 ▼14.57
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0534.69 ▼1.9033.31 ▲0.60
Add New Post /wp-admin/post-new.php1,534 ▼823.12 ▲4.91636.46 ▼2.3865.70 ▲0.09
Media Library /wp-admin/upload.php1,388 ▲34.23 ▼0.0193.17 ▼21.5641.10 ▼3.23

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/allow-comments-on-pages-by-default/allow-comments-on-pages-by-default.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: pages, comments

allow-comments-on-pages-by-default/allow-comments-on-pages-by-default.php Passed 13 tests

Analyzing the main PHP file in "Allow Comments on Pages by Default" version 1.1
56 characters long description:
Turns on comments on pages in WordPress 4.3+ by default.

Code Analysis Passed 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 plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12813

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 were not PNG files found in your plugin