73% quotopia

Code Review | Quotopia

WordPress plugin Quotopia scored73%from 54 tests.

About plugin

  • Plugin page: quotopia
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 11
  • Update frequency: every 103.1 days
  • Top authors: BearlyDoug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.03ms] Passed 4 tests

This is a short check of server-side resources used by Quotopia
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1035.20 ▼8.73
Dashboard /wp-admin3.42 ▲0.1147.72 ▼2.95
Posts /wp-admin/edit.php3.47 ▲0.1149.45 ▼6.59
Add New Post /wp-admin/post-new.php6.02 ▲0.1286.66 ▼9.86
Media Library /wp-admin/upload.php3.34 ▲0.1135.85 ▲1.87
Quotopia /wp-admin/admin.php?page=quotopia3.2930.78
BD Plugins /wp-admin/admin.php?page=bearlydoug3.3138.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Quotopia: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9614.75 ▲0.023.95 ▲2.2936.81 ▼6.92
Dashboard /wp-admin2,232 ▲555.78 ▲0.1496.36 ▼1.7273.85 ▲29.31
Posts /wp-admin/edit.php2,140 ▲402.19 ▲0.2537.93 ▼4.2233.52 ▼5.97
Add New Post /wp-admin/post-new.php1,558 ▲3223.12 ▲0.01769.23 ▲100.0940.93 ▼14.10
Media Library /wp-admin/upload.php1,434 ▲344.36 ▲0.11100.30 ▲1.4468.32 ▲25.39
Quotopia /wp-admin/admin.php?page=quotopia3,3831.8530.5083.03
BD Plugins /wp-admin/admin.php?page=bearlydoug1,4241.7826.0335.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% 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)
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=quotopia
    • > Notice in wp-content/plugins/quotopia/quotopia.php+301
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=quotopia
    • > Warning in wp-content/plugins/quotopia/quotopia.php+290
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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 take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quotopia/images/index.php
    • > /wp-content/plugins/quotopia/quotopia.php
    • > /wp-content/plugins/quotopia/includes/index.php
    • > /wp-content/plugins/quotopia/quotes/index.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/quotopia/includes/BDPluginsNews.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quotopia/functions-bd.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

quotopia/quotopia.php Passed 13 tests

The main PHP file in "Quotopia" ver. 1.0.7 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
Just a simple plugin to display quotes from incredible women in sports.

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
Good job! No executable or dangerous file extensions detected2,789 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43653001,618
PHP572168715
CSS27737456

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.18MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gutenborg.png161.82KB51.46KB▼ 68.20%
images/disable-gutenberg-plugin-icon.png16.22KB16.21KB0.05%
images/vimeo.png0.55KB0.67KB0.00%
images/delete.png0.96KB0.69KB▼ 27.68%
images/spacer.png0.27KB0.09KB▼ 64.60%