84% custom-post-count-at-a-glance

Code Review | Custom Post Count At A Glance

WordPress plugin Custom Post Count At A Glance scored84%from 54 tests.

About plugin

  • Plugin page: custom-post-count...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 24, 2022
  • Latest release: Dec 24, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: onemoreprince (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /178 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.02MB] [CPU: ▼8.72ms] Passed 4 tests

An overview of server-side resources used by Custom Post Count At A Glance
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.08 ▼6.87
Dashboard /wp-admin3.32 ▲0.0253.45 ▼5.34
Posts /wp-admin/edit.php3.37 ▲0.0252.43 ▼0.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.64 ▼22.28
Media Library /wp-admin/upload.php3.24 ▲0.0239.36 ▲0.87
CPT Glance /wp-admin/options-general.php?page=cpt-glance3.2134.23

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Post Count At A Glance
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.19 ▼0.162.02 ▼0.1540.70 ▼2.09
Dashboard /wp-admin2,199 ▲255.59 ▼0.0790.84 ▼8.5539.55 ▼0.53
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0340.27 ▲2.8439.26 ▼1.23
Add New Post /wp-admin/post-new.php1,529 ▲323.38 ▲0.22612.89 ▼82.8966.32 ▲8.89
Media Library /wp-admin/upload.php1,404 ▲14.17 ▼0.0296.60 ▼19.1643.14 ▼5.57
CPT Glance /wp-admin/options-general.php?page=cpt-glance7962.0027.0027.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-post-count-at-a-glance/cpt-count-at-glance.php:20

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: show count of custom posts in wordpress dashboard, custom post count, cpt count in at a glance, display post count in the dashboard

custom-post-count-at-a-glance/cpt-count-at-glance.php 92% from 13 tests

The entry point to "Custom Post Count At A Glance" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-post-count-at-a-glance.php" instead of "cpt-count-at-glance.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141571

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin