83% djhackraj-admin-template

Code Review | Djhackraj Admin Template

WordPress plugin Djhackraj Admin Template scored 83% from 54 tests.

About plugin

  • Plugin page: djhackraj-admin-t...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Jan 18, 2018
  • Number of updates: 13
  • Update frequency: every 0.7 days
  • Top authors: djhackraj (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 628 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: ▼2.25ms] Passed 4 tests

This is a short check of server-side resources used by Djhackraj Admin Template
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.62 ▲0.38
Dashboard /wp-admin3.31 ▲0.0146.13 ▼1.42
Posts /wp-admin/edit.php3.36 ▲0.0043.44 ▼4.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.86 ▼3.50
Media Library /wp-admin/upload.php3.23 ▲0.0033.74 ▲1.93

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Djhackraj Admin Template
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.27 ▼1.101.95 ▲0.2457.96 ▲12.05
Dashboard /wp-admin2,217 ▲284.85 ▼0.1099.02 ▼13.7441.02 ▼1.86
Posts /wp-admin/edit.php2,095 ▲32.12 ▲0.1137.11 ▼1.4639.72 ▲5.42
Add New Post /wp-admin/post-new.php1,520 ▲623.38 ▲5.89582.72 ▼86.8258.28 ▲3.27
Media Library /wp-admin/upload.php1,397 ▲94.22 ▼0.0294.07 ▼11.3548.84 ▲3.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/djhackraj-admin-template/init.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/djhackraj-admin-template/includes/js_css_include.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Stable tag: No value
  • Donate link: Please fix this invalid url: ""
  • Tags: No tags were detected
You can take inspiration from this readme.txt

djhackraj-admin-template/init.php 92% from 13 tests

The main file in "Djhackraj Admin Template" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("djhackraj-admin-template.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin283 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1201267
PHP23916

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png103.47KB29.91KB▼ 71.09%
screenshot-1.png113.65KB33.17KB▼ 70.81%