78% beautiful-pull-quotes

Code Review | Beautiful Pull Quotes

WordPress plugin Beautiful Pull Quotes scored78%from 54 tests.

About plugin

  • Plugin page: beautiful-pull-qu...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 28, 2016
  • Latest release: Jul 28, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: krishnasai44 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /2,222 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.13ms] Passed 4 tests

This is a short check of server-side resources used by Beautiful Pull Quotes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.43 ▼1.18
Dashboard /wp-admin3.33 ▲0.0348.12 ▼3.70
Posts /wp-admin/edit.php3.39 ▲0.0343.61 ▼0.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0285.92 ▼6.66
Media Library /wp-admin/upload.php3.26 ▲0.0237.20 ▲4.44
Beautiful PullQuotes /wp-admin/options-general.php?page=bpquotes3.2029.86

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Beautiful Pull Quotes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▲0.172.24 ▲0.6544.21 ▲0.34
Dashboard /wp-admin2,198 ▲205.50 ▼0.2386.69 ▼14.9539.11 ▼3.77
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0234.84 ▼0.6534.23 ▼0.06
Add New Post /wp-admin/post-new.php1,531 ▲323.81 ▲0.58677.24 ▼7.8869.81 ▲10.20
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.0696.79 ▼0.1744.75 ▼1.41
Beautiful PullQuotes /wp-admin/options-general.php?page=bpquotes7101.516.9724.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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=bpquotes
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/beautiful-pull-quotes/beautiful-pullquotes.php on line 150 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/beautiful-pull-quotes/beautiful-pullquotes.php(150): do_settings_fields()
    #1 wp-includes/class-wp-hook.php(310): bpquotes_options_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beautiful-pull-quotes/beautiful-pullquotes.php:36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Look at our settings page which has preview of styles), #2 (This is how your quotation looks when you use basic style), #3 (This is how your quotation looks when you use Gradient Style.)
The official readme.txt is a good inspiration

beautiful-pull-quotes/beautiful-pullquotes.php 92% from 13 tests

"Beautiful Pull Quotes" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("beautiful-pull-quotes.php" instead of "beautiful-pullquotes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin222 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13933103
CSS225990
JavaScript10029

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.17MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bottomq.png1.15KB1.07KB▼ 7.21%
images/border.png4.66KB4.42KB▼ 5.32%
images/beautiful_pull_quotes.png8.75KB5.05KB▼ 42.28%
images/classic_quote.png1.08KB0.88KB▼ 18.50%
images/basic_view.png43.14KB13.69KB▼ 68.27%