72% wgapiauth

Code Review | WGAPIAuth

WordPress plugin WGAPIAuth scored72%from 54 tests.

About plugin

  • Plugin page: wgapiauth
  • Plugin version: 0.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2014
  • Latest release: Jun 7, 2015
  • Number of updates: 35
  • Update frequency: every 9.3 days
  • Top authors: strejla (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼16.31ms] Passed 4 tests

This is a short check of server-side resources used by WGAPIAuth
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.6014.44 ▼24.63
Dashboard /wp-admin3.40 ▲0.1049.37 ▼2.33
Posts /wp-admin/edit.php3.23 ▼0.1328.64 ▼22.81
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.31 ▼15.45
Media Library /wp-admin/upload.php3.33 ▲0.1036.85 ▲1.10
WG API Auth /wp-admin/plugins.php?page=WGAPIA_settings3.2828.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WGAPIAuth: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.73 ▲0.381.54 ▼0.0948.11 ▲0.28
Dashboard /wp-admin2,193 ▲125.56 ▼0.1198.82 ▼1.7144.03 ▼3.55
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0148.53 ▲13.1339.68 ▲7.42
Add New Post /wp-admin/post-new.php1,531 ▲523.17 ▲0.31587.36 ▼7.0650.21 ▼9.63
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.0999.26 ▼0.7342.92 ▼4.42
WG API Auth /wp-admin/plugins.php?page=WGAPIA_settings1,0922.0222.6747.36

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=WGAPIA_settings
    • > Notice in wp-content/plugins/wgapiauth/wgapiauth.php+33
    Undefined index: show_welcome
    • > GET request to /wp-admin/plugins.php?page=WGAPIA_settings
    • > Notice in wp-content/plugins/wgapiauth/wgapiauth.php+120
    Undefined variable: save

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wgapiauth/templates/load.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wgapiauth/wgapiauth.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in wgapiauth/assets to your readme.txt
The official readme.txt is a good inspiration

wgapiauth/wgapiauth.php 92% from 13 tests

The primary PHP file in "WGAPIAuth" version 0.3.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 656 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,050 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3119366929
HTML110121

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity81.50
▷ Minimum class complexity12.00
▷ Maximum class complexity151.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1147.83%
▷ Protected methods1252.17%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/img/wot.png0.78KB0.94KB0.00%
templates/img/wowp.png0.94KB1.10KB0.00%
templates/img/wows.png0.87KB0.97KB0.00%