10% a-sub-site-teaser-widget

Code Review | A Sub Site Teaser Widget

WordPress plugin A Sub Site Teaser Widget scored 10% from 54 tests.

About plugin

  • Plugin page: a-sub-site-teaser...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 5.8.1
  • First release: Jul 16, 2014
  • Latest release: Jul 16, 2014
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: RaveKev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,346 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/a-sub-site-teaser-widget/a-sub-site-teaser-widget.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; A_Sub_Site_Teaser_Widget has a deprecated constructor

Server metrics [RAM: ▼1.67MB] [CPU: ▼188.88ms] Passed 4 tests

This is a short check of server-side resources used by A Sub Site Teaser Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.96 ▼0.874.97 ▼16.55
Dashboard /wp-admin1.98 ▼1.084.64 ▼43.69
Posts /wp-admin/edit.php1.98 ▼1.134.05 ▼32.11
Add New Post /wp-admin/post-new.php1.98 ▼3.465.19 ▼659.58
Media Library /wp-admin/upload.php1.98 ▼1.023.73 ▼20.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_a_sub_site_teaser_widget

Browser metrics Passed 4 tests

A Sub Site Teaser Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲6815.65 ▲0.615.70 ▼0.8675.92 ▼3.17
Dashboard /wp-admin2,930 ▲346.15 ▼0.00117.56 ▼17.33176.62 ▼1.71
Posts /wp-admin/edit.php2,737 ▼33.24 ▲0.0162.80 ▼5.99135.76 ▼10.95
Add New Post /wp-admin/post-new.php3,807 ▲7118.79 ▲0.18448.12 ▲11.57168.67 ▼6.48
Media Library /wp-admin/upload.php1,752 ▲35.51 ▲0.00142.39 ▲7.78189.12 ▲6.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/a-sub-site-teaser-widget/a-sub-site-teaser-widget.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; A_Sub_Site_Teaser_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_a_sub_site_teaser_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/a-sub-site-teaser-widget/a-sub-site-teaser-widget.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === a-sub-site-teaser-widget === )
The official readme.txt might help

a-sub-site-teaser-widget/a-sub-site-teaser-widget.php Passed 13 tests

The principal PHP file in "A Sub Site Teaser Widget" v. 1.0 is loaded by WordPress automatically on each request
16 characters long description:
Teasers subpages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin614 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16613475
PO File1306879
CSS121160

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity8.57
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
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

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