84% wp-advanced-posts-widget

Code Review | WP Advanced Posts Widget

WordPress plugin WP Advanced Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: wp-advanced-posts...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: Sep 5, 2019
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: lakialex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /872 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.56ms] Passed 4 tests

An overview of server-side resources used by WP Advanced Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1039.57 ▼7.69
Dashboard /wp-admin3.40 ▲0.1046.01 ▼2.98
Posts /wp-admin/edit.php3.51 ▲0.1650.48 ▲6.08
Add New Post /wp-admin/post-new.php5.98 ▲0.1084.46 ▼10.90
Media Library /wp-admin/upload.php3.32 ▲0.0935.03 ▼0.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Advanced Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.71 ▼0.655.55 ▲3.8543.61 ▲5.62
Dashboard /wp-admin2,210 ▲225.85 ▲0.9799.25 ▼6.7039.83 ▼3.08
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0036.72 ▲1.5133.20 ▲0.54
Add New Post /wp-admin/post-new.php1,530 ▼1223.50 ▲5.57633.49 ▼23.9652.81 ▲0.20
Media Library /wp-admin/upload.php1,396 ▲84.11 ▼0.1495.83 ▼0.6541.25 ▼3.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_wpapw_widget
    • widget_theysaidso_widget

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
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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-advanced-posts-widget/inc/class-wpapw-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: posts, sidebar, thumbnails, widgets, widget...

wp-advanced-posts-widget/wpapw.php 85% from 13 tests

Analyzing the main PHP file in "WP Advanced Posts Widget" version 1.0.1
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-advanced-posts-widget.php" instead of "wpapw.php")

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
No dangerous file extensions were detected540 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.12
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
No PNG images were found in this plugin