78% advanced-post-list

Code Review | Advanced Post List

WordPress plugin Advanced Post List scored78%from 54 tests.

About plugin

  • Plugin page: advanced-post-list
  • Plugin version: 0.5.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2011
  • Latest release: Mar 22, 2020
  • Number of updates: 90
  • Update frequency: every 34.4 days
  • Top authors: EkoJr (56.67%)jokerbr313 (44.44%)

Code review

54 tests

User reviews

80 reviews

Install metrics

2,000+ active /134,397 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.11MB] [CPU: ▼3.62ms] Passed 4 tests

An overview of server-side resources used by Advanced Post List
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.03 ▼2.74
Dashboard /wp-admin3.41 ▲0.1145.79 ▲0.32
Posts /wp-admin/edit.php3.53 ▲0.1747.45 ▼3.46
Add New Post /wp-admin/post-new.php6.02 ▲0.1493.43 ▼8.58
Media Library /wp-admin/upload.php3.34 ▲0.1138.68 ▲2.66
All Post Lists /wp-admin/edit.php?post_type=apl_post_list3.4151.68
Settings /wp-admin/admin.php?page=apl_settings3.3836.27
- New Post List /wp-admin/post-new.php?post_type=apl_post_list3.9165.87

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 10 new options
New WordPress options
widget_advanced-post-list_default
can_compress_scripts
theysaidso_admin_options
db_upgraded
apl_notices
widget_recent-posts
widget_theysaidso_widget
category_children
widget_recent-comments
apl_options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Post List
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14113.61 ▼0.561.97 ▲0.3641.62 ▼2.16
Dashboard /wp-admin2,254 ▲635.05 ▼0.85109.97 ▲4.3143.17 ▼6.64
Posts /wp-admin/edit.php2,137 ▲512.02 ▲0.0241.53 ▲5.5234.59 ▲3.07
Add New Post /wp-admin/post-new.php1,566 ▲5218.25 ▲0.72677.99 ▼20.2558.22 ▲1.56
Media Library /wp-admin/upload.php1,433 ▲454.27 ▲0.04123.94 ▲8.5147.24 ▼0.67
All Post Lists /wp-admin/edit.php?post_type=apl_post_list1,1512.4146.5427.06
Settings /wp-admin/admin.php?page=apl_settings1,3852.4662.1837.59
- New Post List /wp-admin/post-new.php?post_type=apl_post_list5,3295.67264.52104.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • apl_notices
    • widget_advanced-post-list_default
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • category_children

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-post-list/templates/admin/meta-box/design/dialog-internal-shortcodes.php
    • > /wp-content/plugins/advanced-post-list/templates/admin/meta-box/settings-info.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-post-list/advanced-post-list.php:44
    • > PHP Warning
      Use of undefined constant APL_DIR - assumed 'APL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-post-list/admin/class-apl-notices.php on line 122
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-post-list/admin/view/display/notice-apl.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-post-list/admin/view/display/notice-default.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/advanced-post-list/templates/admin/meta-box/settings-general.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-post-list/includes/class/class-apl-widget.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/advanced-post-list/templates/admin/meta-box/settings-import-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-post-list/templates/admin/settings-page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/advanced-post-list/templates/admin/meta-box/design-design.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/advanced-post-list/templates/admin/meta-box/post-list-filter.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (71 tag instead of maximum 10)
Please take inspiration from this readme.txt

advanced-post-list/advanced-post-list.php 92% from 13 tests

"Advanced Post List" version 0.5.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 187 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin10,639 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,1794,8927,313
PO File24164851,412
CSS89786955
JavaScript8136390790
XML100169

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity55.71
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods201
▷ Static methods41.99%
▷ Public methods12964.18%
▷ Protected methods10.50%
▷ Private methods7135.32%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/jquery-ui/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
admin/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
admin/css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
admin/css/jquery-ui/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
admin/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%