84% glamour

Code Review | Glamour - Visual CSS Styling Plugin

WordPress plugin Glamour - Visual CSS Styling Plugin scored84%from 54 tests.

About plugin

  • Plugin page: glamour
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 19, 2018
  • Latest release: Oct 17, 2019
  • Number of updates: 8
  • Update frequency: every 72.5 days
  • Top authors: CantoThemes (87.5%)kitthemes (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.44ms] Passed 4 tests

Analyzing server-side resources used by Glamour - Visual CSS Styling Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2042.41 ▲1.25
Dashboard /wp-admin3.47 ▲0.1751.21 ▼3.28
Posts /wp-admin/edit.php3.59 ▲0.2350.89 ▲0.89
Add New Post /wp-admin/post-new.php6.05 ▲0.1795.77 ▼3.92
Media Library /wp-admin/upload.php3.40 ▲0.1734.25 ▼3.44

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Glamour - Visual CSS Styling Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.24 ▼0.311.68 ▼0.0340.43 ▼11.11
Dashboard /wp-admin2,217 ▲405.59 ▲0.0588.19 ▼13.1240.86 ▼6.95
Posts /wp-admin/edit.php2,119 ▲192.01 ▼0.0041.34 ▲6.5834.66 ▼1.94
Add New Post /wp-admin/post-new.php1,544 ▲1823.24 ▲0.07661.43 ▼20.5652.28 ▼13.14
Media Library /wp-admin/upload.php1,422 ▲224.24 ▲0.0296.77 ▼10.1641.92 ▼6.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/glamour/includes/other/about.php:3
    • > PHP Warning
      include_once(): Failed opening 'GLMR_PATH/includes/editor/class-editor.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/glamour/includes/plugin.php on line 48
    • > PHP Warning
      Use of undefined constant GLMR_URL - assumed 'GLMR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/glamour/includes/editor/editor-view.php on line 84
    • > PHP Fatal error
      Uncaught Error: Class 'glamour\\other\\Base' not found in wp-content/plugins/glamour/includes/other/class-css-file.php:5
    • > PHP Warning
      include_once(GLMR_PATH/includes/other/class-admin-bar.php): failed to open stream: No such file or directory in wp-content/plugins/glamour/includes/plugin.php on line 47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/glamour/includes/plugin.php:36
    • > PHP Warning
      Use of undefined constant GLMR_PATH - assumed 'GLMR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/glamour/includes/plugin.php on line 44
    • > PHP Warning
      Use of undefined constant GLMR_PATH - assumed 'GLMR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/glamour/includes/plugin.php on line 46
    • > PHP Warning
      include_once(GLMR_PATH/includes/other/class-css-file.php): failed to open stream: No such file or directory in wp-content/plugins/glamour/includes/plugin.php on line 49
    • > PHP Warning
      include_once(GLMR_PATH/includes/editor/class-editor.php): failed to open stream: No such file or directory in wp-content/plugins/glamour/includes/plugin.php on line 48

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 96% 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
8 plugin tags: visual css, css, editor, custom, customize...

glamour/glamour.php 92% from 13 tests

Analyzing the main PHP file in "Glamour - Visual CSS Styling Plugin" version 1.0.0
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

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
No dangerous file extensions were detected44,501 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript67,1098,03234,931
CSS141,853585,672
SVG30122,829
PHP10166111,069

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity28.83
▷ Minimum class complexity2.00
▷ Maximum class complexity57.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3482.93%
▷ Protected methods00.00%
▷ Private methods717.07%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/panel.png21.95KB7.77KB▼ 64.63%