10% powerpress-posts-from-mysql

Code Review | PowerPress Posts From MySQL addon

WordPress plugin PowerPress Posts From MySQL addon scored10%from 54 tests.

About plugin

  • Plugin page: powerpress-posts-...
  • Plugin version: 0.9.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2012
  • Latest release: Jun 14, 2016
  • Number of updates: 70
  • Update frequency: every 21.0 days
  • Top authors: machouinard (95.71%)amandato (5.71%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,446 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/powerpress-posts-from-mysql/includes/class.local-podcast.php+15
    Trying to access array offset on value of type bool

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

A check of server-side resources used by PowerPress Posts From MySQL addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.69 ▼36.79
Dashboard /wp-admin2.05 ▼1.306.58 ▼58.33
Posts /wp-admin/edit.php2.05 ▼1.316.28 ▼43.46
Add New Post /wp-admin/post-new.php2.05 ▼3.847.05 ▼92.92
Media Library /wp-admin/upload.php2.05 ▼1.186.20 ▼31.41
MySQL Connection /wp-admin/admin.php?page=ppfm_plugin_db_connect2.057.10
MySQL Fields /wp-admin/admin.php?page=ppfm_plugin_db_fields2.057.36
PowerPress from MySQL /wp-admin/admin.php?page=ppfm_plugin2.057.63

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PowerPress Posts From MySQL addon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12513.51 ▼0.971.91 ▼0.0544.75 ▲1.12
Dashboard /wp-admin2,252 ▲524.86 ▼0.01107.00 ▼3.4339.80 ▼4.26
Posts /wp-admin/edit.php2,131 ▲342.06 ▲0.0338.60 ▲1.8734.13 ▲1.32
Add New Post /wp-admin/post-new.php1,570 ▲2520.99 ▼2.10696.07 ▲33.7257.64 ▼14.53
Media Library /wp-admin/upload.php1,431 ▲314.24 ▼0.02111.62 ▲10.2648.01 ▲3.26
MySQL Connection /wp-admin/admin.php?page=ppfm_plugin_db_connect9262.0522.0628.98
MySQL Fields /wp-admin/admin.php?page=ppfm_plugin_db_fields8262.0525.1527.14
PowerPress from MySQL /wp-admin/admin.php?page=ppfm_plugin8482.1627.2628.20

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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/powerpress-posts-from-mysql/includes/class.local-podcast.php+15
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ppfm_plugin
    • > Notice in wp-content/plugins/powerpress-posts-from-mysql/includes/class.local-podcast.php+19
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=ppfm_plugin_db_fields
    • > Warning in wp-content/plugins/powerpress-posts-from-mysql/powerpress-posts-from-mysql.php+150
    count(): Parameter must be an array or an object that implements Countable

SRP 50% 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
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb' not found in wp-content/plugins/powerpress-posts-from-mysql/powerpress-posts-from-mysql.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/powerpress-posts-from-mysql/uninstall.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/powerpress-posts-from-mysql/includes/class.ppfm-list-table.php on line 9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/powerpress-posts-from-mysql/includes/class.ppfm-list-table.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/powerpress-posts-from-mysql/includes/class.ppfm-list-table.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

powerpress-posts-from-mysql/powerpress-posts-from-mysql.php 92% from 13 tests

The main PHP file in "PowerPress Posts From MySQL addon" ver. 0.9.10 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,046 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP51842841,046

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity24.20
▷ Minimum class complexity7.00
▷ Maximum class complexity40.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods66
▷ Static methods1319.70%
▷ Public methods6496.97%
▷ Protected methods00.00%
▷ Private methods23.03%
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

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