84% amazing-post-widget

Code Review | Amazing Posts Widget

WordPress plugin Amazing Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: amazing-post-widget
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9
  • WordPress version: 6.3.1
  • First release: Jun 22, 2013
  • Latest release: Apr 28, 2014
  • Number of updates: 41
  • Update frequency: every 7.6 days
  • Top authors: faugro (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /10,833 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.27ms] Passed 4 tests

This is a short check of server-side resources used by Amazing Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0735.46 ▼3.71
Dashboard /wp-admin3.37 ▲0.0644.00 ▼9.16
Posts /wp-admin/edit.php3.42 ▲0.0647.12 ▲0.54
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.09 ▼10.76
Media Library /wp-admin/upload.php3.29 ▲0.0636.41 ▼1.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_pj_ap_widget
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Amazing Posts Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10913.82 ▼0.537.82 ▲6.1539.78 ▼8.02
Dashboard /wp-admin2,192 ▲145.56 ▼0.0582.45 ▼30.7638.71 ▼8.30
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0038.30 ▲3.5635.47 ▲2.41
Add New Post /wp-admin/post-new.php1,533 ▲723.04 ▼0.07666.90 ▼27.0358.17 ▼3.94
Media Library /wp-admin/upload.php1,403 ▲34.14 ▲0.0094.94 ▼22.7745.28 ▼1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_pj_ap_widget
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/amazing-post-widget/views/amaz-hover.php
    • > /wp-content/plugins/amazing-post-widget/views/admin-amazing.php
    • > /wp-content/plugins/amazing-post-widget/views/amaz-columns.php
    • > /wp-content/plugins/amazing-post-widget/views/amaz-fullwidth-img.php
    • > /wp-content/plugins/amazing-post-widget/amazing-posts-widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: post, custom post types, widget, thumbnails, posts

amazing-post-widget/amazing-posts-widget.php 85% from 13 tests

The main file in "Amazing Posts Widget" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("amazing-post-widget.php" instead of "amazing-posts-widget.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,936 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61492731,051
PHP6118149632
CSS23189253

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin