84% bstone-light

Code Review | Bstone Light

WordPress plugin Bstone Light scored84%from 54 tests.

About plugin

  • Plugin page: bstone-light
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.4
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Oct 27, 2019
  • Number of updates: 10
  • Update frequency: every 50.8 days
  • Top authors: stackthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,085 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.18ms] Passed 4 tests

A check of server-side resources used by Bstone Light
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.90 ▼2.85
Dashboard /wp-admin3.31 ▲0.0045.54 ▲1.08
Posts /wp-admin/edit.php3.36 ▲0.0046.96 ▼1.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.31 ▼17.26
Media Library /wp-admin/upload.php3.23 ▲0.0030.59 ▼2.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Bstone Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.111.82 ▲0.1942.69 ▼0.42
Dashboard /wp-admin2,206 ▲184.83 ▼0.06106.52 ▼13.5940.08 ▼7.45
Posts /wp-admin/edit.php2,092 ▼02.04 ▼0.1238.76 ▼1.3934.08 ▼3.61
Add New Post /wp-admin/post-new.php1,543 ▲2418.43 ▼4.98608.96 ▼75.9258.60 ▲7.15
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0496.67 ▼15.4739.56 ▼8.35

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | 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
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bstone-light/inc/classes/class-bstone-light.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bstone-light/inc/bstone-widgets-init.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bstone-light/inc/classes/widgets/class-bstone-latest-articles-widget.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bstone-light/inc/classes/widgets/social-icons/class-bstone-social-icons-widget.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bstone-light/inc/classes/widgets/class-bstone-search-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: one click import, widgets, theme demos, bstone

bstone-light/bstone-light.php Passed 13 tests

The main PHP script in "Bstone Light" version 1.0.5 is automatically included on every request by WordPress
50 characters long description:
Add extra features like widgets and import/export.

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
No dangerous file extensions were detected4,793 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP163844742,882
CSS4139201,309
JavaScript55835560
SVG10042

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.43
▷ Minimum class complexity2.00
▷ Maximum class complexity57.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods721.88%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/assets/images/logo.png5.28KB2.89KB▼ 45.22%
inc/assets/css/chosen-sprite.png0.53KB0.88KB0.00%