84% swa-alexa

Code Review | SWA-Alexa

WordPress plugin SWA-Alexa scored84%from 54 tests.

About plugin

  • Plugin page: swa-alexa
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.2.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2017
  • Latest release: Jun 28, 2019
  • Number of updates: 5
  • Update frequency: every 118.8 days
  • Top authors: farhadhp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,738 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.78ms] Passed 4 tests

Server-side resources used by SWA-Alexa
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.06 ▼2.29
Dashboard /wp-admin3.33 ▲0.0349.96 ▼0.47
Posts /wp-admin/edit.php3.38 ▲0.0352.34 ▼5.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.51 ▼2.73
Media Library /wp-admin/upload.php3.25 ▲0.0236.81 ▲2.32

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

SWA-Alexa: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.53 ▲0.272.26 ▲0.1743.97 ▲0.55
Dashboard /wp-admin2,208 ▲375.59 ▲0.0089.98 ▼12.2141.34 ▲0.30
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0343.84 ▲2.5934.88 ▼1.80
Add New Post /wp-admin/post-new.php1,544 ▲14023.07 ▲5.30633.59 ▲4.4071.04 ▲28.10
Media Library /wp-admin/upload.php1,413 ▲104.25 ▲0.04101.15 ▼5.2444.80 ▼0.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/swa-alexa/swa-alexa.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Preview of swa-alexa's Admin Page), #2 (Preview of swa-alexa's demo Page)
You can take inspiration from this readme.txt

swa-alexa/swa-alexa.php Passed 13 tests

This is the main PHP file of "SWA-Alexa" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
Its a wordpress plugin to show your websites alexa rank in posts and pages.

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
Good job! No executable or dangerous file extensions detected183 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File2283087
PHP1171068
Markdown119028
CSS1030

PHP code Passed 2 tests

This is a short overview 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.06
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png32.03KB12.80KB▼ 60.03%
screenshot-2.png43.59KB18.87KB▼ 56.71%