84% store-manager

Code Review | Store Manager

WordPress plugin Store Manager scored84%from 54 tests.

About plugin

  • Plugin page: store-manager
  • Plugin version: 1.0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: Mar 19, 2016
  • Number of updates: 9
  • Update frequency: every 5.6 days
  • Top authors: dirlikdesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,458 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.06ms] Passed 4 tests

A check of server-side resources used by Store Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2539.95 ▼1.65
Dashboard /wp-admin3.54 ▲0.2452.51 ▲1.30
Posts /wp-admin/edit.php3.66 ▲0.3047.81 ▲0.88
Add New Post /wp-admin/post-new.php6.12 ▲0.2492.32 ▼12.75
Media Library /wp-admin/upload.php3.46 ▲0.2338.36 ▲4.12
All Stores /wp-admin/edit.php?post_type=store3.5031.07
Add New /wp-admin/post-new.php?post_type=store3.6652.84
Options /wp-admin/edit.php?post_type=store&page=sm-options3.4332.19

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: 1 new table, 6 new options
New tables
wp_store_lat_lng
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Store Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.72 ▼0.011.71 ▼0.3138.16 ▼8.63
Dashboard /wp-admin2,220 ▲495.56 ▼0.1182.51 ▼25.7840.07 ▼8.67
Posts /wp-admin/edit.php2,131 ▲281.96 ▼0.0436.24 ▼6.0534.23 ▼2.49
Add New Post /wp-admin/post-new.php1,552 ▲2623.10 ▼0.07642.86 ▲16.3581.52 ▲26.74
Media Library /wp-admin/upload.php1,428 ▲254.18 ▼0.03101.10 ▲1.7842.22 ▼3.42
All Stores /wp-admin/edit.php?post_type=store1,1371.9831.0128.01
Add New /wp-admin/post-new.php?post_type=store2,8487.74176.4773.86
Options /wp-admin/edit.php?post_type=store&page=sm-options9201.7231.0525.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/store-manager/uninstall.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/store-manager/store-manager.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/store-manager/includes/template-single-store.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Map_Supplier' not found in wp-content/plugins/store-manager/includes/class-supplier-google.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Map_Supplier' not found in wp-content/plugins/store-manager/includes/class-supplier-openstreetmap.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: store, distance, openstreetmap, custom post, radius...

store-manager/store-manager.php Passed 13 tests

The main PHP file in "Store Manager" ver. 1.0.2.2 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Store manager with control over opening hours, location, images and much more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected10,780 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42,5325888,669
PHP7303711,089
CSS38415656
SVG111237
PO File15559129

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity40.25
▷ Minimum class complexity10.00
▷ Maximum class complexity116.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods51
▷ Static methods1835.29%
▷ Public methods4792.16%
▷ Protected methods23.92%
▷ Private methods23.92%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
leaflet/routing-machine/routing-icon.png0.77KB0.49KB▼ 36.62%
leaflet/images/layers.png1.47KB1.05KB▼ 28.36%
leaflet/routing-machine/leaflet.routing.icons.png3.19KB2.62KB▼ 17.99%
leaflet/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%
leaflet/images/layers-2x.png2.83KB1.67KB▼ 41.10%