89% altoshift

Code Review | Altoshift For Wordpress

WordPress plugin Altoshift For Wordpress scored 89% from 54 tests.

About plugin

  • Plugin page: altoshift
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 4, 2019
  • Latest release: May 4, 2019
  • Number of updates: 7
  • Update frequency: every 4.6 days
  • Top authors: altoshift (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Altoshift For Wordpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.47 ▼4.40
Dashboard /wp-admin3.32 ▲0.0244.40 ▼1.86
Posts /wp-admin/edit.php3.37 ▲0.0245.89 ▼6.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.04 ▼4.79
Media Library /wp-admin/upload.php3.24 ▲0.0236.91 ▲1.53
Layer /wp-admin/admin.php?page=altoshift-layer3.2431.95
Data Feed /wp-admin/admin.php?page=altoshift-feed3.2535.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Altoshift For Wordpress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.62 ▼0.752.47 ▲0.3945.47 ▲5.57
Dashboard /wp-admin2,233 ▲425.86 ▲0.96113.87 ▲3.7343.08 ▲0.56
Posts /wp-admin/edit.php2,116 ▲271.99 ▼0.0436.65 ▼3.9833.86 ▼2.68
Add New Post /wp-admin/post-new.php1,555 ▲1318.62 ▲0.49626.19 ▲18.5769.39 ▲21.98
Media Library /wp-admin/upload.php1,409 ▲214.22 ▲0.0298.44 ▲0.5644.94 ▲0.71
Layer /wp-admin/admin.php?page=altoshift-layer8542.0524.8127.21
Data Feed /wp-admin/admin.php?page=altoshift-feed8662.1525.0326.10

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

altoshift/AltoshiftWordpressPlugin.php 92% from 13 tests

The entry point to "Altoshift For Wordpress" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("altoshift.php" instead of "AltoshiftWordpressPlugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected771 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP911617718
Markdown118053

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods820.51%
▷ Public methods2564.10%
▷ Protected methods00.00%
▷ Private methods1435.90%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected