84% comments-by-post-type

Code Review | Comments by Post Type

WordPress plugin Comments by Post Type scored84%from 54 tests.

About plugin

  • Plugin page: comments-by-post-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Mar 12, 2016
  • Number of updates: 5
  • Update frequency: every 38.4 days
  • Top authors: oriolo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,129 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.00MB] [CPU: ▼8.44ms] Passed 4 tests

An overview of server-side resources used by Comments by Post Type
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.07 ▼5.82
Dashboard /wp-admin3.32 ▼0.0345.39 ▼18.11
Posts /wp-admin/edit.php3.37 ▲0.0146.48 ▼1.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.76 ▼5.73
Media Library /wp-admin/upload.php3.24 ▲0.0133.89 ▼4.08
Comments /wp-admin/edit-comments.php?post_type=attachment3.3037.32
Comments /wp-admin/edit-comments.php?post_type=page3.3034.28

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Comments by Post Type
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.001.63 ▼0.0441.91 ▲1.89
Dashboard /wp-admin2,193 ▲285.50 ▼0.0884.45 ▼12.6037.88 ▼2.37
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0134.92 ▼4.5336.28 ▲0.09
Add New Post /wp-admin/post-new.php1,529 ▲123.65 ▲0.50671.61 ▼3.5061.62 ▲1.59
Media Library /wp-admin/upload.php1,404 ▲44.25 ▲0.00101.51 ▼8.6646.74 ▲1.98
Comments /wp-admin/edit-comments.php?post_type=attachment1,5342.2438.0731.54
Comments /wp-admin/edit-comments.php?post_type=page1,5322.2734.9032.08

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comments-by-post-type/comments-by-post-type.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: comments, custom post types, admin menu

comments-by-post-type/comments-by-post-type.php 92% from 13 tests

The main file in "Comments by Post Type" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1254239

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected