73% devpri-custom-code

Code Review | Devpri Custom Code

WordPress plugin Devpri Custom Code scored73%from 54 tests.

About plugin

  • Plugin page: devpri-custom-code
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: May 22, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Devpri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼22.10ms] Passed 4 tests

A check of server-side resources used by Devpri Custom Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.87 ▼2.11
Dashboard /wp-admin3.34 ▼0.0147.90 ▼10.98
Posts /wp-admin/edit.php3.39 ▲0.0346.75 ▼2.06
Add New Post /wp-admin/post-new.php3.18 ▼2.7135.25 ▼73.25
Media Library /wp-admin/upload.php3.26 ▲0.0334.45 ▲2.62
Add New /wp-admin/post-new.php?post_type=devpri_custom_code3.1832.96
Custom Code /wp-admin/edit.php?post_type=devpri_custom_code3.3034.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Devpri Custom Code
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10516.27 ▲1.511.73 ▼0.0538.59 ▼0.41
Dashboard /wp-admin2,254 ▲696.85 ▲0.99149.14 ▲45.7843.90 ▲1.42
Posts /wp-admin/edit.php2,139 ▲504.06 ▲2.0685.62 ▲47.8536.94 ▲4.70
Add New Post /wp-admin/post-new.php1,560 ▲2724.84 ▲1.69622.00 ▼46.9132.98 ▼21.66
Media Library /wp-admin/upload.php1,430 ▲425.92 ▲1.73131.85 ▲30.7040.97 ▼4.96
Add New /wp-admin/post-new.php?post_type=devpri_custom_code1,7444.9376.1640.82
Custom Code /wp-admin/edit.php?post_type=devpri_custom_code1,1164.0766.8528.31

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=devpri_custom_code
    • > Notice in wp-content/plugins/devpri-custom-code/admin/class-devpri-custom-code-post.php+124
    Undefined index: devpri-custom-code-nonce
    • > GET request to /wp-admin/post-new.php?post_type=devpri_custom_code
    • > Notice in wp-content/plugins/devpri-custom-code/admin/class-devpri-custom-code-post.php+124
    Trying to get property 'id' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/devpri-custom-code/admin/views/partials/devpri-custom-code-admin-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/devpri-custom-code/admin/views/meta-boxes/options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/devpri-custom-code/admin/views/meta-boxes/content.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: custom css, custom code, custom js, html

devpri-custom-code/devpri-custom-code.php Passed 13 tests

The primary PHP file in "Devpri Custom Code" version 1.0.0 is used by WordPress to initiate all plugin functionality
51 characters long description:
A simple plugin to display HTML/CSS/JS custom code.

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
Good job! No executable or dangerous file extensions detected471 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12116487344
JavaScript362787
CSS12440

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin