83% ys-miscellany

Code Review | Miscellany

WordPress plugin Miscellany scored83%from 54 tests.

About plugin

  • Plugin page: ys-miscellany
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2022
  • Latest release: Dec 19, 2022
  • Number of updates: 2
  • Update frequency: every 8.0 days
  • Top authors: laddoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.70ms] Passed 4 tests

This is a short check of server-side resources used by Miscellany
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1344.41 ▲4.97
Dashboard /wp-admin3.41 ▲0.1051.43 ▲4.72
Posts /wp-admin/edit.php3.52 ▲0.1652.56 ▼2.32
Add New Post /wp-admin/post-new.php6.20 ▲0.3198.03 ▼6.10
Media Library /wp-admin/upload.php3.33 ▲0.1036.33 ▲0.88
Add New /wp-admin/post-new.php?post_type=miscellany6.2087.36
Tags /wp-admin/edit-tags.php?taxonomy=miscellany_tag&post_type=miscellany3.3242.44
Categories /wp-admin/edit-tags.php?taxonomy=miscellany_category&post_type=miscellany3.3235.93
All /wp-admin/edit.php?post_type=miscellany3.3745.24
Tools/Language /wp-admin/edit-tags.php?taxonomy=tools_used&post_type=miscellany3.3233.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Miscellany
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.58 ▼0.715.96 ▲4.1441.56 ▼4.34
Dashboard /wp-admin2,267 ▲735.84 ▼0.0196.21 ▼8.6442.18 ▼1.32
Posts /wp-admin/edit.php2,140 ▲402.00 ▼0.0139.48 ▼2.3336.45 ▼1.65
Add New Post /wp-admin/post-new.php1,562 ▲3623.19 ▲5.43669.50 ▲43.5961.61 ▲11.72
Media Library /wp-admin/upload.php1,437 ▲374.25 ▲0.0596.21 ▼16.6345.07 ▼2.50
Add New /wp-admin/post-new.php?post_type=miscellany1,59817.08847.8833.98
Tags /wp-admin/edit-tags.php?taxonomy=miscellany_tag&post_type=miscellany1,2922.1426.6631.52
Categories /wp-admin/edit-tags.php?taxonomy=miscellany_category&post_type=miscellany1,3172.1426.9930.74
All /wp-admin/edit.php?post_type=miscellany1,1791.9832.3233.59
Tools/Language /wp-admin/edit-tags.php?taxonomy=tools_used&post_type=miscellany1,2922.1426.3130.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ys-miscellany/admin/partials/miscellany-admin-display.php
    • > /wp-content/plugins/ys-miscellany/public/partials/miscellany-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === ys-miscellany === )
You can look at the official readme.txt

ys-miscellany/miscellany.php 85% from 13 tests

The main PHP file in "Miscellany" ver. 1.0.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: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("ys-miscellany.php" instead of "miscellany.php")

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 plugin259 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12125543253
JavaScript24546
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected