78% gravitation-brands

Code Review | Gravitation Brands

WordPress plugin Gravitation Brands scored78%from 54 tests.

About plugin

  • Plugin page: gravitation-brands
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2015
  • Latest release: Sep 19, 2019
  • Number of updates: 11
  • Update frequency: every 124.5 days
  • Top authors: UlisesFreitas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.54ms] Passed 4 tests

An overview of server-side resources used by Gravitation Brands
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.29 ▼4.24
Dashboard /wp-admin3.35 ▲0.0444.53 ▼2.37
Posts /wp-admin/edit.php3.40 ▲0.0446.28 ▼0.06
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.94 ▲0.50
Media Library /wp-admin/upload.php3.27 ▲0.0433.37 ▲0.84
Add New /wp-admin/post-new.php?post_type=gv_brands3.3243.90
All brands /wp-admin/edit.php?post_type=gv_brands3.3136.25

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Gravitation Brands
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.29 ▼1.114.76 ▲2.8040.74 ▼9.87
Dashboard /wp-admin2,237 ▲465.81 ▼0.0996.59 ▼1.7541.85 ▲1.22
Posts /wp-admin/edit.php2,123 ▲372.00 ▼0.0539.42 ▲3.9634.18 ▲0.62
Add New Post /wp-admin/post-new.php1,540 ▲717.85 ▼5.35614.09 ▲10.7349.79 ▼5.03
Media Library /wp-admin/upload.php1,422 ▲314.23 ▲0.0092.47 ▼3.5540.01 ▼3.27
Add New /wp-admin/post-new.php?post_type=gv_brands1,6683.6370.1434.12
Help /wp-admin/gravitation-brands.php260.440.1413.61
All brands /wp-admin/edit.php?post_type=gv_brands1,1001.9529.4729.41

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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)
Good news, no errors were detected

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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gravitation-brands/gravitation-brands.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/gravitation-brands.php
    • > Network (severe)
    wp-admin/gravitation-brands.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
Please take inspiration from this readme.txt

gravitation-brands/gravitation-brands.php 92% from 13 tests

The main file in "Gravitation Brands" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,584 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34548571,789
PO File4120120346
PHP28372258
CSS3822191

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.28MB with 0.22MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/brand.png7.55KB1.32KB▼ 82.55%
images/no-image.png7.55KB1.32KB▼ 82.55%
screenshot-1.png144.98KB40.32KB▼ 72.19%
screenshot-2.png131.58KB36.02KB▼ 72.62%