84% w4-post-list

Code Review | W4 Post List

WordPress plugin W4 Post List scored84%from 54 tests.

About plugin

  • Plugin page: w4-post-list
  • Plugin version: 2.4.7
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2010
  • Latest release: Sep 28, 2023
  • Number of updates: 266
  • Update frequency: every 17.6 days
  • Top authors: sajib1223 (100%)

Code review

54 tests

User reviews

92 reviews

Install metrics

5,000+ active /170,116 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.29MB] [CPU: ▲4.66ms] Passed 4 tests

Server-side resources used by W4 Post List
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.74 ▲1.2850.71 ▲8.50
Dashboard /wp-admin4.62 ▲1.3253.18 ▲3.57
Posts /wp-admin/edit.php4.67 ▲1.3257.03 ▲7.99
Add New Post /wp-admin/post-new.php7.22 ▲1.33101.23 ▼1.43
Media Library /wp-admin/upload.php4.48 ▲1.2543.81 ▲9.93
All Lists /wp-admin/edit.php?post_type=w4pl4.5949.92
Documentation /wp-admin/edit.php?post_type=w4pl&page=w4pl-docs4.4538.69
Add New /wp-admin/post-new.php?post_type=w4pl4.6757.29

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 86 new files
Database: no new tables, 7 new options
New WordPress options
widget_w4_post_list
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by W4 Post List
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.10 ▼0.511.93 ▲0.4644.93 ▲0.77
Dashboard /wp-admin2,223 ▲435.61 ▼0.1287.18 ▲1.3339.67 ▼3.97
Posts /wp-admin/edit.php2,128 ▲252.00 ▲0.0241.09 ▲3.0636.70 ▲5.57
Add New Post /wp-admin/post-new.php6,213 ▲4,68726.17 ▲2.98895.90 ▲277.9962.25 ▲16.56
Media Library /wp-admin/upload.php1,428 ▲254.26 ▲0.08108.16 ▲9.6945.79 ▲4.79
All Lists /wp-admin/edit.php?post_type=w4pl1,1081.9730.4330.54
Documentation /wp-admin/edit.php?post_type=w4pl&page=w4pl-docs9302.1121.8335.83
Add New /wp-admin/post-new.php?post_type=w4pl2,7315.0496.8252.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_w4_post_list
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/w4-post-list/admin/pages/views/html-template-examples.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/w4-post-list/admin/pages/views/html-plugin-updates.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/w4-post-list/admin/views/html-list-edit-form.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/w4-post-list/admin/pages/views/html-template-tags.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/w4-post-list/appsero.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/w4-post-list/admin/pages/views/html-plugin-links.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/w4-post-list/admin/pages/views/html-usage.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: post, custom post type, shortcode, widget, post list...

w4-post-list/w4-post-list.php 85% from 13 tests

Analyzing the main PHP file in "W4 Post List" version 2.4.7
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "5.7")

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
Everything looks great! No dangerous files found in this plugin9,687 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP661,5592,5628,191
CSS6026547
JavaScript510472518
Markdown1820255
XML151199
JSON20077

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.49
Average class complexity22.67
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes12.33%
Methods355
▷ Static methods10429.30%
▷ Public methods31488.45%
▷ Protected methods71.97%
▷ Private methods349.58%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin