84% bns-theme-details

Code Review | BNS Theme Details

WordPress plugin BNS Theme Details scored84%from 54 tests.

About plugin

  • Plugin page: bns-theme-details
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Feb 18, 2014
  • Latest release: Apr 10, 2016
  • Number of updates: 11
  • Update frequency: every 71.1 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼11.73ms] Passed 4 tests

This is a short check of server-side resources used by BNS Theme Details
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.82 ▼4.82
Dashboard /wp-admin3.43 ▲0.1346.52 ▼10.05
Posts /wp-admin/edit.php3.55 ▲0.1948.41 ▼4.34
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.43 ▼27.72
Media Library /wp-admin/upload.php3.36 ▲0.1338.33 ▼1.71

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_bns-theme-details
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

BNS Theme Details: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.25 ▼0.071.61 ▼0.4743.83 ▲0.40
Dashboard /wp-admin2,198 ▲245.64 ▼0.0283.54 ▼16.0336.08 ▼7.63
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0138.66 ▲1.3235.19 ▲1.20
Add New Post /wp-admin/post-new.php1,526 ▼023.75 ▲0.01618.70 ▼45.5241.72 ▼21.04
Media Library /wp-admin/upload.php1,394 ▼34.18 ▲0.0297.37 ▼19.7743.80 ▼5.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_bns-theme-details

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bns-theme-details/bns-theme-details.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

bns-theme-details/bns-theme-details.php Passed 13 tests

"BNS Theme Details" version 0.4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
81 characters long description:
Displays theme specific details such as download count, last update, author, etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin493 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1262563482
CSS122411
JavaScript1030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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