10% rs-bruce-lee-quotes

Code Review | RS Bruce Lee Quotes

WordPress plugin RS Bruce Lee Quotes scored 10% from 53 tests.

About plugin

  • Plugin page: rs-bruce-lee-quotes
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 5.8.1
  • First release: Sep 3, 2014
  • Latest release: Apr 20, 2015
  • Number of updates: 8
  • Update frequency: every 28.6 days
  • Top authors: rorystandley (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 589 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/rs-bruce-lee-quotes/bruce.php+25
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼310.25ms] Passed 4 tests

This is a short check of server-side resources used by RS Bruce Lee Quotes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼0.985.00 ▼17.56
Dashboard /wp-admin1.76 ▼1.294.71 ▼39.72
Posts /wp-admin/edit.php1.76 ▼1.346.55 ▼33.85
Add New Post /wp-admin/post-new.php1.76 ▼3.674.52 ▼1,132.83
Media Library /wp-admin/upload.php1.76 ▼1.245.37 ▼34.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: 1 new table, 2 new options
New tables
wp_rs_bruce_table
New WordPress options
widget_bruce_widget
bruce_db_version

Browser metrics Passed 4 tests

RS Bruce Lee Quotes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,787 ▲20516.34 ▲0.4611.80 ▲3.2548.40 ▲3.66
Dashboard /wp-admin2,961 ▲1085.95 ▼0.07149.97 ▲15.51105.36 ▲6.03
Posts /wp-admin/edit.php2,703 ▼02.68 ▼0.0169.74 ▲4.1492.69 ▲0.52
Add New Post /wp-admin/post-new.php1,853 ▲219.19 ▲1.83353.43 ▼11.02109.29 ▼2.73
Media Library /wp-admin/upload.php1,778 ▲65.01 ▲0.01156.74 ▲2.51109.97 ▼3.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/rs-bruce-lee-quotes/bruce.php+25
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_bruce_widget

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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/rs-bruce-lee-quotes/public/views/public.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/rs-bruce-lee-quotes/public/views/public.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rs-bruce-lee-quotes/public/class-bruce-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

rs-bruce-lee-quotes/bruce.php 92% from 13 tests

"RS Bruce Lee Quotes" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rs-bruce-lee-quotes.php" instead of "bruce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected263 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP89898257
JavaScript1505
CSS2021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods826.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin