84% bcorp-slider

Code Review | BCorp Slider

WordPress plugin BCorp Slider scored 84% from 54 tests.

About plugin

  • Plugin page: bcorp-slider
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: Jan 28, 2016
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: BCorp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 985 total downloads


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
Install script ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▼3.64ms] Passed 4 tests

Server-side resources used by BCorp Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5439.95 ▼3.02
Dashboard /wp-admin3.85 ▲0.5545.98 ▼3.47
Posts /wp-admin/edit.php3.96 ▲0.6147.91 ▲0.72
Add New Post /wp-admin/post-new.php6.45 ▲0.5685.56 ▼8.79
Media Library /wp-admin/upload.php3.77 ▲0.5538.10 ▲3.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BCorp Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.50 ▼0.881.71 ▲0.1240.51 ▼4.98
Dashboard /wp-admin2,221 ▲334.89 ▲0.0596.51 ▼12.8737.09 ▼5.73
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0138.11 ▲2.2532.69 ▼1.72
Add New Post /wp-admin/post-new.php1,527 ▼1523.37 ▲5.32653.18 ▲22.3967.75 ▲10.63
Media Library /wp-admin/upload.php1,403 ▲184.23 ▼0.02100.38 ▼4.2343.02 ▲1.47

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bcorp-slider/bcorp_slider.php:13

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, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

bcorp-slider/bcorp_slider.php 92% from 13 tests

The main file in "BCorp Slider" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bcorp-slider.php" instead of "bcorp_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,285 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity45.50
▷ Minimum class complexity3.00
▷ Maximum class complexity88.00
Average method complexity6.56
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
36 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/slider/a11.png4.07KB2.49KB▼ 38.87%
images/slider/a19.png4.08KB2.64KB▼ 35.30%
images/slider/b07.png1.74KB1.60KB▼ 8.24%
images/slider/b05.png1.38KB1.22KB▼ 11.73%
images/slider/a02.png5.63KB3.45KB▼ 38.77%