84% dtech-random-page

Code Review | dTech Random Page

WordPress plugin dTech Random Page scored 84% from 54 tests.

About plugin

  • Plugin page: dtech-random-page
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Jun 18, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: gajinder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 920 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.29ms] Passed 4 tests

Server-side resources used by dTech Random Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.59 ▼1.09
Dashboard /wp-admin3.31 ▲0.0144.88 ▼0.32
Posts /wp-admin/edit.php3.37 ▲0.0142.28 ▼3.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.97 ▼2.33
Media Library /wp-admin/upload.php3.24 ▲0.0132.58 ▼1.73

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_dtechrandompage
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by dTech Random Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼1113.31 ▼1.504.18 ▲2.3538.54 ▲1.49
Dashboard /wp-admin2,209 ▲64.89 ▼0.96101.14 ▲3.1040.26 ▼1.88
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0833.31 ▼1.3832.63 ▲0.91
Add New Post /wp-admin/post-new.php1,539 ▲623.24 ▲0.08681.75 ▼23.9453.95 ▼4.63
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0695.37 ▼13.9142.64 ▼4.14

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_dtechrandompage
    • can_compress_scripts

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)
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dtech-random-page/dtech-random-page.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === dtech-random-page === )
The official readme.txt is a good inspiration

dtech-random-page/dtech-random-page.php Passed 13 tests

The main file in "dTech Random Page" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
The plugin show latest page content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14615107

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin