83% post-page-sidebar-excerpts-by-maui-marketing

Code Review | Post & Page Sidebar Excerpts by Maui Marketing

WordPress plugin Post & Page Sidebar Excerpts by Maui Marketing scored83%from 54 tests.

About plugin

  • Plugin page: post-page-sidebar...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 3, 2016
  • Latest release: Mar 3, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: mauimarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼2.38ms] Passed 4 tests

An overview of server-side resources used by Post & Page Sidebar Excerpts by Maui Marketing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.96 ▲1.50
Dashboard /wp-admin3.45 ▲0.1050.63 ▼16.73
Posts /wp-admin/edit.php3.56 ▲0.2150.75 ▲1.02
Add New Post /wp-admin/post-new.php6.03 ▲0.1488.22 ▲4.68
Media Library /wp-admin/upload.php3.37 ▲0.1440.53 ▲4.68

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_mm_sidebar_page_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_mm_sidebar_post_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Post & Page Sidebar Excerpts by Maui Marketing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.35 ▼0.221.86 ▲0.0751.80 ▲1.86
Dashboard /wp-admin2,205 ▲255.65 ▼0.0191.95 ▲0.2339.10 ▼1.62
Posts /wp-admin/edit.php2,107 ▲41.98 ▼0.0639.46 ▼1.0042.05 ▲1.80
Add New Post /wp-admin/post-new.php9,512 ▲7,98632.47 ▲8.751,236.76 ▲600.52327.37 ▲278.39
Media Library /wp-admin/upload.php1,410 ▲104.18 ▼0.01101.65 ▲4.4741.63 ▼0.20

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
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • widget_mm_sidebar_post_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_mm_sidebar_page_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-page-sidebar-excerpts-by-maui-marketing/inc/mm-sidebar-post-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/post-page-sidebar-excerpts-by-maui-marketing/mm-sidebar-excerpts.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-page-sidebar-excerpts-by-maui-marketing/inc/mm-sidebar-page-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("none")
You can take inspiration from this readme.txt

post-page-sidebar-excerpts-by-maui-marketing/mm-sidebar-excerpts.php 85% from 13 tests

"Post & Page Sidebar Excerpts by Maui Marketing" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-page-sidebar-excerpts-by-maui-marketing.php" instead of "mm-sidebar-excerpts.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected664 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP38223586
CSS23078
JavaScript1250

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity27.33
▷ Minimum class complexity26.00
▷ Maximum class complexity28.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 2.81MB with 1.78MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png2,500.28KB660.74KB▼ 73.57%
assets/screenshot-3.png50.81KB29.04KB▼ 42.84%
assets/screenshot-2.png135.73KB46.04KB▼ 66.08%
assets/screenshot-1.png191.47KB54.60KB▼ 71.48%