83% advanced-post-widget

Code Review | Advanced Post Widget

WordPress plugin Advanced Post Widget scored83%from 54 tests.

About plugin

  • Plugin page: advanced-post-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Apr 3, 2016
  • Number of updates: 4
  • Update frequency: every 61.5 days
  • Top authors: mrkindy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,067 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.65MB] [CPU: ▼13.93ms] Passed 4 tests

Analyzing server-side resources used by Advanced Post Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.74 ▲3.39
Dashboard /wp-admin3.35 ▲0.0449.71 ▲0.08
Posts /wp-admin/edit.php3.40 ▲0.0449.29 ▲3.77
Add New Post /wp-admin/post-new.php3.18 ▼2.7037.02 ▼56.07
Media Library /wp-admin/upload.php3.27 ▲0.0433.30 ▼3.10

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_kindy_widget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Post Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.31 ▼0.041.66 ▼0.4041.54 ▼4.80
Dashboard /wp-admin2,195 ▲185.63 ▼0.0187.92 ▼9.3239.16 ▼4.07
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0239.88 ▲0.5636.27 ▼0.18
Add New Post /wp-admin/post-new.php6,226 ▲4,70026.19 ▲3.11881.49 ▲198.9851.95 ▼5.82
Media Library /wp-admin/upload.php1,400 ▼34.28 ▲0.06101.62 ▼3.2543.53 ▼2.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_kindy_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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 fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/advanced-post-widget/template/widget_4.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-post-widget/kindy_widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/advanced-post-widget/template/widget_3.php:43
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/advanced-post-widget/template/widget_1.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/advanced-post-widget/template/widget_1.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/advanced-post-widget/template/widget_6.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/advanced-post-widget/template/widget_2.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

advanced-post-widget/kindy_widget.php 77% from 13 tests

The main PHP script in "Advanced Post Widget" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-post-widget.php" instead of "kindy_widget.php")

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
Everything looks great! No dangerous files found in this plugin470 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP64824433
CSS10037

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin