84% dx-github-zen

Code Review | DX GitHub Zen

WordPress plugin DX GitHub Zen scored84%from 54 tests.

About plugin

  • Plugin page: dx-github-zen
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Aug 21, 2015
  • Number of updates: 7
  • Update frequency: every 100.9 days
  • Top authors: nofearinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,140 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by DX GitHub Zen
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.25 ▼0.76
Dashboard /wp-admin3.34 ▼0.0154.26 ▼13.48
Posts /wp-admin/edit.php3.39 ▲0.0350.47 ▲3.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.82 ▼6.95
Media Library /wp-admin/upload.php3.26 ▲0.0336.16 ▼3.38

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_dx_zen_widget

Browser metrics Passed 4 tests

A check of browser resources used by DX GitHub Zen
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.23 ▼0.421.99 ▲0.3244.73 ▼1.97
Dashboard /wp-admin2,192 ▲155.51 ▼0.0582.44 ▼10.6036.04 ▼2.94
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0235.31 ▼6.9231.61 ▼5.96
Add New Post /wp-admin/post-new.php1,526 ▼323.12 ▲0.20605.42 ▼62.4463.77 ▲0.57
Media Library /wp-admin/upload.php1,403 ▲94.25 ▲0.06100.95 ▼2.0845.01 ▼0.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_dx_zen_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dx-github-zen/dx-zen-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dx-github-zen/dx-zen-widget.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dx-github-zen/dx-zen-widget.class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: github, messages, http, plugin, zen

dx-github-zen/dx-github-zen.php 92% from 13 tests

The principal PHP file in "DX GitHub Zen" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin111 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34084111

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.50
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin