10% nice-quotes-rotator

Code Review | Nice Quotes Rotator

WordPress plugin Nice Quotes Rotator scored 10% from 54 tests.

About plugin

  • Plugin page: nice-quotes-rotator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2010
  • Latest release: Oct 12, 2012
  • Number of updates: 33
  • Update frequency: every 22.2 days
  • Top authors: CodeAndReload (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 12,410 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/nice-quotes-rotator/nice_quotes.php+224
    Methods with the same name as their class will not be constructors in a future version of PHP; nqWidget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼50.73ms] Passed 4 tests

A check of server-side resources used by Nice Quotes Rotator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.87 ▼37.03
Dashboard /wp-admin2.10 ▼1.206.16 ▼45.94
Posts /wp-admin/edit.php2.11 ▼1.255.81 ▼39.75
Add New Post /wp-admin/post-new.php2.11 ▼3.785.96 ▼80.20
Media Library /wp-admin/upload.php2.11 ▼1.126.85 ▼26.46
Nice Quote Options /wp-admin/plugins.php?page=nicequote-options2.216.47

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_nqwidget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nice Quotes Rotator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.161.80 ▼0.1843.17 ▼6.53
Dashboard /wp-admin2,210 ▲225.89 ▼0.13108.13 ▲4.5940.90 ▼0.64
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.1042.45 ▲5.1937.23 ▲3.67
Add New Post /wp-admin/post-new.php1,531 ▲323.23 ▲4.93667.53 ▲67.3048.99 ▼7.98
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0195.75 ▼16.3440.16 ▼7.42
Nice Quote Options /wp-admin/plugins.php?page=nicequote-options9442.0424.1836.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/nice-quotes-rotator/nice_quotes.php+224
    Methods with the same name as their class will not be constructors in a future version of PHP; nqWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_nqwidget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/plugins.php?page=nicequote-options
    • > Deprecated in wp-content/plugins/nice-quotes-rotator/nice_quotes.php+224
    Methods with the same name as their class will not be constructors in a future version of PHP; nqWidget has a deprecated constructor
    • > GET request to /wp-admin/plugins.php?page=nicequote-options
    • > Deprecated in wp-content/plugins/nice-quotes-rotator/nice_quotes.php+263
    Function create_function() is deprecated
    • > GET request to /wp-admin/plugins.php?page=nicequote-options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in nqWidget is deprecated since version 4.3.0! Use __construct() instead.

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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nice-quotes-rotator/nice_quotes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nice-quotes-rotator/pluggable_example.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nice-quotes-rotator/admin_page.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (This is the options screen showing the settings available with Nice Quotes Rotator.), #2 (This is the Nice Quotes settings added to the Widgets menu.)
Please take inspiration from this readme.txt

nice-quotes-rotator/nice_quotes.php 85% from 13 tests

"Nice Quotes Rotator" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nice-quotes-rotator.php" instead of "nice_quotes.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 518 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin397 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39231397

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.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
2 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png214.49KB90.85KB▼ 57.65%
screenshot-2.png16.62KB5.34KB▼ 67.86%