78% gold-price-live

Code Review | Gold Price Live

WordPress plugin Gold Price Live scored78%from 54 tests.

About plugin

  • Plugin page: gold-price-live
  • Plugin version: 20.20
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Nov 9, 2012
  • Latest release: Feb 7, 2020
  • Number of updates: 47
  • Update frequency: every 56.3 days
  • Top authors: GoldPriceLive (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /10,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.43ms] Passed 4 tests

This is a short check of server-side resources used by Gold Price Live
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.88 ▼2.88
Dashboard /wp-admin3.31 ▲0.0143.47 ▼0.51
Posts /wp-admin/edit.php3.36 ▲0.0148.64 ▲7.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.80 ▼12.07
Media Library /wp-admin/upload.php3.24 ▲0.0138.84 ▲5.75
Gold_Price_Live /wp-admin/options-general.php?page=Gold_Price_Live3.2029.86

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gold Price Live
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.45 ▼0.231.70 ▼0.1340.49 ▼0.98
Dashboard /wp-admin2,204 ▲135.83 ▲0.97100.29 ▼7.0441.08 ▼2.54
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0439.86 ▲4.9135.28 ▲1.66
Add New Post /wp-admin/post-new.php1,536 ▲323.08 ▲0.00636.25 ▼0.6160.19 ▲5.52
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.03110.37 ▲12.7847.11 ▲5.56
Gold_Price_Live /wp-admin/options-general.php?page=Gold_Price_Live1,4238.49384.4963.15

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gold-price-live/index.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=Gold_Price_Live
    • > Deprecation (warning) in unknown
    https://cdn02.jotfor.ms/static/jotform.forms.js?3.3.45302 114 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/options-general.php?page=Gold_Price_Live
    • > Javascript (severe) in unknown
    https://js.stripe.com/v3/ 0:394447 Uncaught t: Live Stripe.js integrations must use HTTPS. For mo…ation: https://stripe.com/docs/security/guide#tls

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Gold Price Live Spot Table), #2 (Gold Price Live Charts)
You can look at the official readme.txt

gold-price-live/index.php 85% from 13 tests

The main PHP file in "Gold Price Live" ver. 20.20 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gold-price-live.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 840 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin204 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111110204

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.01
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png74.77KB30.91KB▼ 58.66%
screenshot-1.png142.30KB22.61KB▼ 84.11%