84% businesspress

Code Review | BusinessPress

WordPress plugin BusinessPress scored84%from 54 tests.

About plugin

  • Plugin page: businesspress
  • Plugin version: 0.9.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Aug 22, 2023
  • Number of updates: 85
  • Update frequency: every 32.0 days
  • Top authors: FolioVision (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /8,740 total downloads

Benchmarks

Plugin footprint 82% 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.13MB] [CPU: ▼7.76ms] Passed 4 tests

Server-side resources used by BusinessPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.97 ▼3.57
Dashboard /wp-admin3.49 ▲0.1545.92 ▼20.41
Posts /wp-admin/edit.php3.54 ▲0.1948.69 ▼0.75
Add New Post /wp-admin/post-new.php6.03 ▲0.1594.56 ▼6.32
Media Library /wp-admin/upload.php3.35 ▲0.1233.92 ▲1.69
BusinessPress /wp-admin/options-general.php?page=businesspress3.3738.15

Server storage [IO: ▲0.76MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.69KB) outside of "wp-content/plugins/businesspress/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
businesspress
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

BusinessPress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.42 ▼0.931.41 ▼0.3644.48 ▼0.25
Dashboard /wp-admin2,266 ▲785.15 ▼0.76116.28 ▼0.5741.20 ▼1.64
Posts /wp-admin/edit.php2,291 ▲2022.68 ▲0.6654.61 ▲18.7233.78 ▲1.19
Add New Post /wp-admin/post-new.php1,518 ▲423.23 ▲5.39686.68 ▲24.8653.99 ▼6.37
Media Library /wp-admin/upload.php1,521 ▲1304.68 ▲0.41112.33 ▲16.7842.73 ▲1.61
BusinessPress /wp-admin/options-general.php?page=businesspress2,6783.7852.4544.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/businesspress/plugins/disable-embeds.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/businesspress/businesspress-settings.class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/businesspress/upload-path-fix.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/businesspress/plugins/fv-user-lock-out.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/businesspress/fv-search.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/businesspress/plugins/fv-fix-new-user-nicenames.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/businesspress/plugins/fv-require-email-address-for-login.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/businesspress/plugins/auto-post-thumbnail.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/businesspress/plugins/disable-json-api.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/businesspress/businesspress-notices.class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The plugin welcome screen - if user privileges are restricted, there is a contact form to contact the site admin), #2 (The WordPress Updates settings tab), #3 (Various things you can tweak), #4 (Branding options), #5 (The improved Updates screen)
The official readme.txt might help

businesspress/businesspress.php Passed 13 tests

The entry point to "BusinessPress" version 0.9.13 is a PHP file that has certain tags in its header comment area
29 characters long description:
This plugin secures your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,249 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,3116363,743
CSS54115438
JavaScript3101050
Markdown117018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity90.50
▷ Minimum class complexity6.00
▷ Maximum class complexity437.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods172
▷ Static methods00.00%
▷ Public methods16394.77%
▷ Protected methods00.00%
▷ Private methods95.23%
Functions35
▷ Named functions2880.00%
▷ Anonymous functions720.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.41MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png65.01KB22.75KB▼ 65.01%
screenshot-3.png102.54KB36.42KB▼ 64.49%
screenshot-5.png123.78KB47.56KB▼ 61.58%
css/search-icon.png0.39KB0.27KB▼ 30.48%
css/businesspress-logo.png1.60KB0.83KB▼ 48.32%