10% shops2apps

Code Review | Shops2Apps

WordPress plugin Shops2Apps scored 10% from 54 tests.

About plugin

  • Plugin page: shops2apps
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: Jan 30, 2016
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: shops2apps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 847 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Shops2AppsMobileApp::register_register_activation_hook() should not be called statically

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

This is a short check of server-side resources used by Shops2Apps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.65 ▲1.93
Dashboard /wp-admin3.32 ▲0.0144.80 ▼4.13
Posts /wp-admin/edit.php3.37 ▲0.0145.86 ▼3.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.21 ▼3.05
Media Library /wp-admin/upload.php3.24 ▲0.0133.33 ▲3.70
mApp - Settings /wp-admin/admin.php?page=shops2apps-ma-settings3.2429.68
mApp - Panel /wp-admin/admin.php?page=shops2apps-ma3.2629.98

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Shops2Apps
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.42 ▼1.261.67 ▼0.1543.24 ▼5.32
Dashboard /wp-admin2,235 ▲475.80 ▼0.09102.76 ▼5.5040.03 ▼0.43
Posts /wp-admin/edit.php2,124 ▲352.00 ▼0.0041.89 ▲1.0835.08 ▼0.40
Add New Post /wp-admin/post-new.php1,563 ▲3023.22 ▼0.22627.42 ▲27.0951.52 ▲2.03
Media Library /wp-admin/upload.php1,426 ▲414.21 ▲0.03100.34 ▼2.5541.80 ▼3.45
mApp - Settings /wp-admin/admin.php?page=shops2apps-ma-settings1,0042.2430.1439.29
mApp - Panel /wp-admin/admin.php?page=shops2apps-ma1,2222.5544.7943.95
/wp-admin/admin.php?page=#shops2apps280.440.094.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shops2apps-ma
    • > Warning in wp-content/plugins/shops2apps/class.shops2apps-mobile-app-util.php+29
    file_get_contents(wp-content/plugins/shops2apps/configs/conf.user.json): failed to open stream: No such file or directory
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shops2apps-ma
    • > Notice in wp-content/plugins/shops2apps/views/shops2apps-ma_menu_my_panel.php+39
    Undefined index: tab
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shops2apps-ma
    • > Notice in wp-content/plugins/shops2apps/views/shops2apps-ma_tab_design.php+96
    Undefined index: design
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shops2apps-ma
    • > Notice in wp-content/plugins/shops2apps/views/shops2apps-ma_tab_design.php+96
    Trying to access array offset on value of type null

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

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)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=#shops2apps
    • > Network (severe)
    wp-admin/admin.php?page=#shops2apps - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

shops2apps/shops2apps-mobile-app-plugin.php 92% from 13 tests

The main PHP file in "Shops2Apps" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shops2apps.php" instead of "shops2apps-mobile-app-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected6,253 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,299174,238
PHP13155271,249
SVG100640
JavaScript1812125
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png9.23KB4.04KB▼ 56.29%