78% featured-posts-with-multiple-custom-groups-fpmcg

Code Review | Featured Posts with Multiple Custom Groups (FPMCG)

WordPress plugin Featured Posts with Multiple Custom Groups (FPMCG) scored78%from 54 tests.

About plugin

  • Plugin page: featured-posts-wi...
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 29, 2012
  • Latest release: Jun 10, 2020
  • Number of updates: 33
  • Update frequency: every 83.3 days
  • Top authors: sumitsurai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /5,789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼6.82ms] Passed 4 tests

This is a short check of server-side resources used by Featured Posts with Multiple Custom Groups (FPMCG)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /31.71 ▲0.015,772,719.03 ▲8,134.50
Dashboard /wp-admin3.59 ▲0.2053.48 ▼19.43
Posts /wp-admin/edit.php3.64 ▲0.2453.84 ▲3.39
Add New Post /wp-admin/post-new.php6.17 ▲0.2391.72 ▼15.43
Media Library /wp-admin/upload.php3.52 ▲0.2441.24 ▲4.21
Help /wp-admin/admin.php?page=wafysol-fpmcg-help3.4836.09
Config /wp-admin/admin.php?page=wafysol-fpmcg-config3.4836.83
Upgrade /wp-admin/admin.php?page=wafysol-fpmcg-upgrade3.4836.52
Custom Post Type /wp-admin/edit.php?post_type=wafysol_fpmcg3.5640.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Featured Posts with Multiple Custom Groups (FPMCG)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.33 ▲0.041.59 ▼0.1938.75 ▼4.41
Dashboard /wp-admin2,225 ▲515.62 ▲0.0189.68 ▼1.6141.22 ▼3.71
Posts /wp-admin/edit.php2,130 ▲271.95 ▼0.0837.69 ▼2.6333.47 ▼8.97
Add New Post /wp-admin/post-new.php6,254 ▲4,72618.89 ▼4.401,120.31 ▲435.8268.64 ▲5.97
Media Library /wp-admin/upload.php1,430 ▲334.20 ▼0.00104.96 ▲5.7946.39 ▲3.84
Help /wp-admin/admin.php?page=wafysol-fpmcg-help1,0662.1223.5630.66
Config /wp-admin/admin.php?page=wafysol-fpmcg-config8352.0026.0930.07
Upgrade /wp-admin/admin.php?page=wafysol-fpmcg-upgrade7932.0323.5925.75
Custom Post Type /wp-admin/edit.php?post_type=wafysol_fpmcg1,1321.9029.6333.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_custom_featured_post_widget
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wafysol_fpmcg
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wafysol_fpmcg
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/featured-posts-with-multiple-custom-groups-fpmcg/postconfig.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-posts-with-multiple-custom-groups-fpmcg/wafy-fpmcg-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-posts-with-multiple-custom-groups-fpmcg/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/featured-posts-with-multiple-custom-groups-fpmcg/widget.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/featured-posts-with-multiple-custom-groups-fpmcg/postconfig.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/featured-posts-with-multiple-custom-groups-fpmcg/postconfig.php on line 28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: featured posts, widget, post, sidebar, plugin

featured-posts-with-multiple-custom-groups-fpmcg/postconfig.php 77% from 13 tests

"Featured Posts with Multiple Custom Groups (FPMCG)" version 4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("featured-posts-with-multiple-custom-groups-fpmcg.php" instead of "postconfig.php")
  • Description: The description should be shorter than 140 characters (currently 420 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,208 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5131311,208

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity77.50
▷ Minimum class complexity40.00
▷ Maximum class complexity115.00
Average method complexity20.12
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin