83% custom-widget-post

Code Review | Custom Widget Post

WordPress plugin Custom Widget Post scored83%from 54 tests.

About plugin

  • Plugin page: custom-widget-post
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2018
  • Latest release: Nov 2, 2022
  • Number of updates: 47
  • Update frequency: every 31.8 days
  • Top authors: mhkanon (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /1,466 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.14MB] [CPU: ▼4.68ms] Passed 4 tests

Analyzing server-side resources used by Custom Widget Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.57 ▼1.28
Dashboard /wp-admin3.45 ▲0.1553.36 ▼1.08
Posts /wp-admin/edit.php3.56 ▲0.2154.18 ▲0.11
Add New Post /wp-admin/post-new.php6.03 ▲0.1493.70 ▼16.46
Media Library /wp-admin/upload.php3.37 ▲0.1436.11 ▲3.00

Server storage [IO: ▲0.05MB] [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: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_cwp_register
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Widget Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.34 ▼0.011.84 ▼0.0544.88 ▲0.12
Dashboard /wp-admin2,204 ▲275.48 ▼0.1490.92 ▼8.9938.90 ▲0.87
Posts /wp-admin/edit.php2,119 ▲192.01 ▼0.0335.92 ▼3.2134.31 ▼2.38
Add New Post /wp-admin/post-new.php1,545 ▲1118.18 ▼0.03625.89 ▼32.3362.32 ▼19.21
Media Library /wp-admin/upload.php1,412 ▲94.17 ▼0.0798.84 ▼7.7041.77 ▼4.57

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_cwp_register
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-widget-post/Custom-Widget-Post.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-widget-post/page_menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

custom-widget-post/Custom-Widget-Post.php 77% from 13 tests

The main PHP file in "Custom Widget Post" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-widget-post.php" instead of "Custom-Widget-Post.php")

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 detected1,249 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4313261,249

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.27
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity19.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%
Functions67
▷ Named functions6698.51%
▷ Anonymous functions11.49%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin