84% wp-custom-code

Code Review | WP Custom Code

WordPress plugin WP Custom Code scored84%from 54 tests.

About plugin

  • Plugin page: wp-custom-code
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2019
  • Latest release: Sep 23, 2022
  • Number of updates: 3
  • Update frequency: every 446.0 days
  • Top authors: bboyguil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /575 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.90ms] Passed 4 tests

Analyzing server-side resources used by WP Custom Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.15 ▲0.03
Dashboard /wp-admin3.34 ▲0.0347.21 ▲0.10
Posts /wp-admin/edit.php3.39 ▲0.0347.15 ▼2.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.97 ▲1.58
Media Library /wp-admin/upload.php3.26 ▲0.0334.50 ▼1.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Custom Code
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6815.03 ▲0.871.81 ▼0.5147.90 ▲2.03
Dashboard /wp-admin2,231 ▲396.39 ▲1.40140.73 ▲34.2043.56 ▼0.05
Posts /wp-admin/edit.php2,123 ▲343.44 ▲1.4285.09 ▲43.4536.15 ▲0.32
Add New Post /wp-admin/post-new.php6,444 ▲4,92527.33 ▲4.17972.83 ▲292.3263.42 ▲12.32
Media Library /wp-admin/upload.php1,418 ▲365.24 ▲0.89127.22 ▲1.1042.16 ▼4.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Please fix the following
  • 1× 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/wp-custom-code/wp-custom-code.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #2 (With CodeMirror it's easier to type your code), #3 (We added the pt_BR version.), #4 (The code is not replicated on every page.), #5 (Add the address of the library you want to add.)
  • Screenshots: No descriptions were found for these screenshots #0, #0, #0, #0 in wp-custom-code/assets to your readme.txt
Please take inspiration from this readme.txt

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

The principal PHP file in "WP Custom Code" v. 1.1.0 is loaded by WordPress automatically on each request
78 characters long description:
Add custom CSS and JavaScript to your pages and post in simple and handy ways.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin446 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP410040311
PO File1212368
JavaScript14040
Markdown119023
CSS1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.33
▷ Minimum class complexity13.00
▷ Maximum class complexity15.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
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

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