84% glance-that

Code Review | Glance That

WordPress plugin Glance That scored84%from 54 tests.

About plugin

  • Plugin page: glance-that
  • Plugin version: 4.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.5
  • WordPress version: 6.3.1
  • First release: Jan 2, 2014
  • Latest release: Jul 16, 2020
  • Number of updates: 44
  • Update frequency: every 54.3 days
  • Top authors: UaMV (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

500+ active /15,204 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
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼6.08ms] Passed 4 tests

Analyzing server-side resources used by Glance That
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3043.72 ▲3.95
Dashboard /wp-admin3.65 ▲0.3051.01 ▼3.78
Posts /wp-admin/edit.php3.72 ▲0.3644.73 ▼2.59
Add New Post /wp-admin/post-new.php6.19 ▲0.3079.99 ▼20.84
Media Library /wp-admin/upload.php3.53 ▲0.3035.27 ▲2.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Glance That
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲25413.60 ▼0.994.62 ▲3.0243.79 ▲1.98
Dashboard /wp-admin2,406 ▲2355.84 ▲0.2890.49 ▲6.8244.03 ▲2.99
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0135.65 ▲1.1032.08 ▼3.11
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.31662.05 ▲34.7054.72 ▼4.57
Media Library /wp-admin/upload.php1,403 ▲34.24 ▼0.09108.85 ▲12.4144.05 ▲3.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/glance-that/glance-that.php:32

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #2, #3, #4 in glance-that/assets to your readme.txt
The official readme.txt might help

glance-that/glance-that.php Passed 13 tests

The main PHP script in "Glance That" version 4.9 is automatically included on every request by WordPress
52 characters long description:
Adds content control to At a Glance on the Dashboard

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,018 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14412901,481
CSS1281355
JavaScript14914182

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 200)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity333.00
▷ Minimum class complexity333.00
▷ Maximum class complexity333.00
Average method complexity12.86
▷ Minimum method complexity1.00
▷ Maximum method complexity200.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected