83% glass-it-price-tracker

Code Review | Glass It Price Tracker

WordPress plugin Glass It Price Tracker scored83%from 54 tests.

About plugin

  • Plugin page: glass-it-price-tr...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: May 3, 2023
  • Number of updates: 13
  • Update frequency: every 24.2 days
  • Top authors: glassit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Glass It Price Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.84 ▼3.42
Dashboard /wp-admin3.32 ▲0.0251.15 ▼3.11
Posts /wp-admin/edit.php3.37 ▲0.0152.04 ▲0.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.21 ▼5.41
Media Library /wp-admin/upload.php3.24 ▲0.0136.73 ▼0.02
Glass It Options /wp-admin/options-general.php?page=GlassIt_Plugin_Options3.2534.14

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 78 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
GlassIt_1.0.5_KEY
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Glass It Price Tracker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.83 ▲0.451.83 ▼0.1544.82 ▼1.49
Dashboard /wp-admin2,218 ▲274.87 ▼0.18109.09 ▲3.2742.22 ▲2.22
Posts /wp-admin/edit.php2,098 ▲92.08 ▲0.0539.14 ▲3.1534.60 ▼0.87
Add New Post /wp-admin/post-new.php1,536 ▲323.36 ▼0.02634.50 ▼43.0052.40 ▲0.46
Media Library /wp-admin/upload.php1,397 ▲94.27 ▲0.04107.93 ▲2.6245.33 ▼0.03
Glass It Options /wp-admin/options-general.php?page=GlassIt_Plugin_Options7982.0725.4926.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • GlassIt_1.0.5_KEY
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_categories() in wp-content/plugins/glass-it-price-tracker/glassit_admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/glass-it-price-tracker/glassit.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
6 plugin tags: price, competitor, history, discount, monitor...

glass-it-price-tracker/glassit.php 77% from 13 tests

"Glass It Price Tracker" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("glass-it-price-tracker.php" instead of "glassit.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,231 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS13203199894
PHP22514163
HTML1352106
JavaScript16067
SVG1001

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.26
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%
Functions3
▷ Named functions3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
25 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) help/__MACOSX/assets/blueprint-css/plugins/link-icons/icons/._doc.png0.23KB0.00KB▼ 100.00%
help/assets/blueprint-css/plugins/buttons/icons/tick.png0.52KB0.52KB0.00%
help/assets/blueprint-css/plugins/buttons/icons/cross.png0.64KB0.72KB0.00%
(invalid) help/__MACOSX/assets/blueprint-css/plugins/buttons/icons/._tick.png0.23KB0.00KB▼ 100.00%
(invalid) help/__MACOSX/assets/blueprint-css/plugins/link-icons/icons/._external.png0.23KB0.00KB▼ 100.00%