78% quotes-and-tips

Code Review | Quotes and Tips by BestWebSoft

WordPress plugin Quotes and Tips by BestWebSoft scored78%from 54 tests.

About plugin

  • Plugin page: quotes-and-tips
  • Plugin version: 1.44
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2012
  • Latest release: Jul 18, 2023
  • Number of updates: 73
  • Update frequency: every 56.9 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /49,421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▲3.81ms] Passed 4 tests

An overview of server-side resources used by Quotes and Tips by BestWebSoft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.31 ▼8.18
Dashboard /wp-admin3.45 ▲0.1556.77 ▲10.18
Posts /wp-admin/edit.php3.57 ▲0.2255.93 ▲6.04
Add New Post /wp-admin/post-new.php6.09 ▲0.20106.24 ▲7.51
Media Library /wp-admin/upload.php3.38 ▲0.1542.56 ▲9.85
Tips Categories /wp-admin/edit-tags.php?taxonomy=tips_categories&post_type=tips3.3839.89
BWS Panel /wp-admin/edit.php?post_type=quote&page=qtsndtps-bws-panel3.8442.23
Add New /wp-admin/post-new.php?post_type=tips3.5162.78
BWS Panel /wp-admin/edit.php?post_type=tips&page=qtsndtps-bws-panel3.3845.54
Quotes Categories /wp-admin/edit-tags.php?taxonomy=quotes_categories&post_type=quote3.3842.38
Quotes /wp-admin/edit.php?post_type=quote3.4343.22
Add New /wp-admin/post-new.php?post_type=quote3.5955.91
Tips /wp-admin/edit.php?post_type=tips3.4342.63

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quotes and Tips by BestWebSoft
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲12513.33 ▼1.411.89 ▼0.1741.17 ▼2.59
Dashboard /wp-admin2,288 ▲1005.89 ▲0.02111.10 ▲4.1244.22 ▲1.87
Posts /wp-admin/edit.php2,343 ▲2542.25 ▲0.1939.00 ▼2.1036.01 ▲0.75
Add New Post /wp-admin/post-new.php1,751 ▲23117.78 ▼5.51640.31 ▲19.9054.84 ▲4.01
Media Library /wp-admin/upload.php1,476 ▲914.21 ▼0.0599.58 ▼2.4043.05 ▼1.47
Tips Categories /wp-admin/edit-tags.php?taxonomy=tips_categories&post_type=tips1,5211.9128.6428.48
BWS Panel /wp-admin/edit.php?post_type=quote&page=qtsndtps-bws-panel3,0472.0043.9871.63
Add New /wp-admin/post-new.php?post_type=tips2,5407.79174.9466.56
BWS Panel /wp-admin/edit.php?post_type=tips&page=qtsndtps-bws-panel3,0462.0230.7683.54
Quotes Categories /wp-admin/edit-tags.php?taxonomy=quotes_categories&post_type=quote1,5241.9229.8926.50
Quotes /wp-admin/edit.php?post_type=quote1,3572.0231.9830.32
Settings /wp-admin/quotes-and-tips.php260.440.1012.94
Add New /wp-admin/post-new.php?post_type=quote2,8187.89180.6259.31
Tips /wp-admin/edit.php?post_type=tips1,3542.1434.4731.21

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/quotes-and-tips/quotes-and-tips.php:1398
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quotes-and-tips/bws_menu/class-bws-settings.php:1453
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/quotes-and-tips/includes/class-qtsndtps-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/quotes-and-tips/bws_menu/product_list.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=tips&page=qtsndtps-bws-panel
    • > Network (severe)
    http://ps.w.org/custom-admin-page/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/quotes-and-tips.php
    • > Network (severe)
    wp-admin/quotes-and-tips.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Frontend page with Quotes and Tips block.), #2 (Quotes and Tips Settings.), #3 (Quotes and Tips Appearance Settings.), #4 (Quote edit page.), #5 (Categories page.)
You can take inspiration from this readme.txt

quotes-and-tips/quotes-and-tips.php Passed 13 tests

The main PHP file in "Quotes and Tips by BestWebSoft" ver. 1.44 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Add customizable quotes and tips blocks to WordPress posts, pages and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected20,962 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PO File134,1796,2468,837
PHP105216305,981
CSS91552565,418
JavaScript635110559
SVG400167

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity103.67
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity13.32
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions87
▷ Named functions87100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
66 PNG files occupy 3.23MB with 1.87MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_65_ffffff_1x400.png0.26KB0.09KB▼ 66.79%
bws_menu/icons/plugins/bike-rental.png6.86KB2.68KB▼ 60.89%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%