10% jmb-post-feeds

Code Review | JMB Post Feeds

WordPress plugin JMB Post Feeds scored10%from 54 tests.

About plugin

  • Plugin page: jmb-post-feeds
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 19, 2017
  • Latest release: Jul 19, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jmb272 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /602 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php+14
    Non-static method JMB_Post_Feeds::get_instance() should not be called statically

Server metrics [RAM: ▼1.97MB] [CPU: ▼55.17ms] Passed 4 tests

This is a short check of server-side resources used by JMB Post Feeds
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.77 ▼35.30
Dashboard /wp-admin2.05 ▼1.305.36 ▼58.41
Posts /wp-admin/edit.php2.05 ▼1.315.50 ▼40.58
Add New Post /wp-admin/post-new.php2.05 ▼3.845.55 ▼86.37
Media Library /wp-admin/upload.php2.05 ▼1.186.56 ▼28.68
Testing /wp-admin/edit.php?post_type=jmb_post_feed&page=jmb-pf-test-page2.055.14
All Post Feeds /wp-admin/edit.php?post_type=jmb_post_feed2.056.58
Add New /wp-admin/post-new.php?post_type=jmb_post_feed2.055.56

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
recovery_mode_email_last_sent
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for JMB Post Feeds
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.65 ▲0.071.63 ▼0.0541.48 ▲0.72
Dashboard /wp-admin2,229 ▲495.56 ▼0.0483.11 ▼4.9837.38 ▲1.05
Posts /wp-admin/edit.php2,134 ▲371.99 ▲0.0435.97 ▼1.6130.53 ▼0.09
Add New Post /wp-admin/post-new.php45 ▼1,4830.42 ▼22.670.10 ▼652.789.97 ▼54.86
Media Library /wp-admin/upload.php1,425 ▲224.20 ▼0.02108.69 ▲5.17103.57 ▲53.71
Testing /wp-admin/edit.php?post_type=jmb_post_feed&page=jmb-pf-test-page8111.9622.9924.24
All Post Feeds /wp-admin/edit.php?post_type=jmb_post_feed550.420.139.19
Add New /wp-admin/post-new.php?post_type=jmb_post_feed550.420.1010.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php+14
    Non-static method JMB_Post_Feeds::get_instance() should not be called statically
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-posts

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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=jmb_post_feed
    • > Deprecated in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php+14
    Non-static method JMB_Post_Feeds::get_instance() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=jmb_post_feed
    • > Notice in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php+104
    date_default_timezone_set(): Timezone ID '' is invalid
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=jmb_post_feed
    • > Notice in wp-content/plugins/jmb-post-feeds/includes/test-page.php+71
    Undefined variable: td
    • > GET request to /wp-admin/edit.php?post_type=jmb_post_feed
    • > Error in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php+61
    Uncaught Error: Call to undefined function call_user_method_array() in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php:61
    Stack trace:
    #0 wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php(236): JMB_Post_Feeds->__call()
    #1 wp-includes/class-wp-hook.php(310): JMB_Post_Feeds->admin_enqueue_scripts()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin-header.php(118): do_action()
    #5 wp-admin/edit.php(407): require_once('/var/www/wordpr...')
    #6 {main}
    thrown
    • > GET request to /wp-admin/post-new.php?post_type=jmb_post_feed
    • > Error in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php+61
    Uncaught Error: Call to undefined function call_user_method_array() in wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php:61
    Stack trace:
    #0 wp-content/plugins/jmb-post-feeds/jmb-post-feeds.php(236): JMB_Post_Feeds->__call()
    #1 wp-includes/class-wp-hook.php(310): JMB_Post_Feeds->admin_enqueue_scripts()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin-header.php(118): do_action()
    #5 wp-admin/edit-form-advanced.php(425): require_once('/var/www/wordpr...')
    #6 wp-admin/post-new.php(75): require('/var/www/wordpr...')
    #7 {main}
    thrown

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=jmb_post_feed
    • > Network (severe)
    wp-admin/edit.php?post_type=jmb_post_feed - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/post-new.php?post_type=jmb_post_feed
    • > Network (severe)
    wp-admin/post-new.php?post_type=jmb_post_feed - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === jmb-post-feeds === )
The official readme.txt is a good inspiration

jmb-post-feeds/jmb-post-feeds.php 85% from 13 tests

The main file in "JMB Post Feeds" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin1,631 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP144074091,459
JavaScript14715147
CSS13425

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity31.29
▷ Minimum class complexity4.00
▷ Maximum class complexity98.00
Average method complexity5.61
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods4597.83%
▷ Protected methods00.00%
▷ Private methods12.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin