84% dx-category-reports

Code Review | DX Category Reports

WordPress plugin DX Category Reports scored84%from 54 tests.

About plugin

  • Plugin page: dx-category-reports
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: Feb 21, 2022
  • Number of updates: 5
  • Update frequency: every 464.2 days
  • Top authors: devrix (60%)nofearinc (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.60ms] Passed 4 tests

An overview of server-side resources used by DX Category Reports
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.28 ▼5.21
Dashboard /wp-admin3.32 ▲0.0249.20 ▼3.08
Posts /wp-admin/edit.php3.37 ▲0.0245.91 ▼4.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.37 ▼9.63
Media Library /wp-admin/upload.php3.24 ▲0.0240.47 ▲3.54
DX Category Reports /wp-admin/options-general.php?page=dx-category-reports3.2233.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for DX Category Reports
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.37 ▲0.031.74 ▼0.0543.26 ▲1.37
Dashboard /wp-admin2,196 ▲385.50 ▼0.1983.61 ▼18.2740.15 ▼1.34
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0434.73 ▼1.4135.26 ▼3.57
Add New Post /wp-admin/post-new.php1,530 ▼523.04 ▲4.67676.45 ▲19.6366.00 ▼5.46
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0196.54 ▼8.6245.07 ▲1.53
DX Category Reports /wp-admin/options-general.php?page=dx-category-reports8222.0324.4030.90

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dx-category-reports/inc/templates/admin-template.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dx-category-reports/dx-category-reports.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (DX Category Reports Settings page), #2 (Count of posts submitted under Post Formats over time)
You can look at the official readme.txt

dx-category-reports/dx-category-reports.php 92% from 13 tests

Analyzing the main PHP file in "DX Category Reports" version 1.0
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected208 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33573121
CSS17087

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.22
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.12KB10.40KB▼ 60.20%