84% geargrams-wp

Code Review | GearGrams

WordPress plugin GearGrams scored84%from 54 tests.

About plugin

  • Plugin page: geargrams-wp
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: May 9, 2016
  • Number of updates: 10
  • Update frequency: every 6.6 days
  • Top authors: geargrams (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by GearGrams
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.18 ▼1.78
Dashboard /wp-admin3.31 ▼0.0451.54 ▼11.90
Posts /wp-admin/edit.php3.36 ▲0.0048.15 ▲2.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.50 ▼15.08
Media Library /wp-admin/upload.php3.23 ▲0.0036.60 ▲0.33

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by GearGrams
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.69 ▲0.321.77 ▲0.0944.10 ▲4.59
Dashboard /wp-admin2,192 ▲125.55 ▼0.0899.94 ▲8.2544.35 ▲3.69
Posts /wp-admin/edit.php2,103 ▲241.98 ▲0.0338.03 ▼0.4837.23 ▲2.44
Add New Post /wp-admin/post-new.php1,528 ▼023.18 ▲0.17638.69 ▲13.5660.38 ▼12.80
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.0699.51 ▲3.1443.23 ▲0.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/geargrams-wp/geargrams.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

geargrams-wp/geargrams.php 92% from 13 tests

The main PHP script in "GearGrams" version 0.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("geargrams-wp.php" instead of "geargrams.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected610 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript18622360
PHP13820142
CSS1305108

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.02
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin