83% old-school-themes-admin

Code Review | Old-School Themes Admin

WordPress plugin Old-School Themes Admin scored83%from 54 tests.

About plugin

  • Plugin page: old-school-themes...
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Sep 26, 2015
  • Number of updates: 10
  • Update frequency: every 10.6 days
  • Top authors: santeven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /754 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.83ms] Passed 4 tests

An overview of server-side resources used by Old-School Themes Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.66 ▼1.84
Dashboard /wp-admin3.32 ▲0.0147.83 ▲1.09
Posts /wp-admin/edit.php3.37 ▲0.0151.28 ▲3.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.73 ▼13.97
Media Library /wp-admin/upload.php3.24 ▲0.0138.26 ▲3.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Old-School Themes Admin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.25 ▼0.281.86 ▲0.3941.74 ▼2.39
Dashboard /wp-admin2,199 ▲195.58 ▼0.0889.72 ▲0.9241.90 ▼1.63
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0240.25 ▲4.7339.16 ▼0.35
Add New Post /wp-admin/post-new.php1,531 ▲523.26 ▲2.00670.30 ▼55.5568.37 ▲16.50
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.1299.08 ▼11.5946.76 ▲0.99

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/old-school-themes-admin/old-school-themes-admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === old-school-themes-admin === )
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: A description for screenshot #2 is required in old-school-themes-admin/assets to your readme.txt
You can take inspiration from this readme.txt

old-school-themes-admin/old-school-themes-admin.php Passed 13 tests

"Old-School Themes Admin" version 0.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
Display links to the old custom-header and custom-background admin pages in both the dashboard and the front-end toolbar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101435

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.89
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin