84% maanstore-api

Code Review | MaanStore API

WordPress plugin MaanStore API scored84%from 54 tests.

About plugin

  • Plugin page: maanstore-api
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2023
  • Latest release: May 31, 2023
  • Number of updates: 3
  • Update frequency: every 34.7 days
  • Top authors: arafatjamil01 (66.67%)maantheme (66.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /202 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 gracefully, with no errors

Server metrics [RAM: ▲2.53MB] [CPU: ▲10.89ms] Passed 4 tests

An overview of server-side resources used by MaanStore API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.00 ▲2.5454.65 ▲11.82
Dashboard /wp-admin5.83 ▲2.4865.15 ▲3.16
Posts /wp-admin/edit.php5.94 ▲2.5969.02 ▲24.60
Add New Post /wp-admin/post-new.php8.69 ▲2.81105.04 ▲3.98
Media Library /wp-admin/upload.php5.75 ▲2.5259.93 ▲26.92

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

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

Browser metrics Passed 4 tests

MaanStore API: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.23 ▼1.191.67 ▲0.1735.39 ▼5.63
Dashboard /wp-admin2,222 ▲374.84 ▼1.02109.52 ▲4.9943.16 ▲4.76
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0639.60 ▲4.8134.61 ▲0.11
Add New Post /wp-admin/post-new.php1,546 ▲2623.22 ▼0.00656.15 ▼6.5057.03 ▲1.41
Media Library /wp-admin/upload.php1,407 ▲164.18 ▼0.0296.56 ▼4.2942.92 ▼1.06

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • maanstore_purchase_code

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FlutterBaseController' not found in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/helpers/delivery-woo-helper.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-tera-wallet.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-myfatoorah.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'FlutterBaseController' not found in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-vendor-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-home.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/listing-rest-api/class.api.fields.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-multi-vendor.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-booking.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/maan-flutter-delivery.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Products_Controller' not found in wp-content/plugins/maanstore-api/includes/flutter-api/controllers/flutter-products.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: maanstore, maantheme, flutter, react-native, ios...

maanstore-api/maanstore-api.php Passed 13 tests

"MaanStore API" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
102 characters long description:
The MaanStore API Plugin which is used for REST API configurations of mobile apps created by MaanTheme

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin19,510 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP432,4662,03819,342
JavaScript160161
CSS2037

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity71.35
▷ Minimum class complexity1.00
▷ Maximum class complexity396.00
Average method complexity7.12
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods443
▷ Static methods112.48%
▷ Public methods39589.16%
▷ Protected methods357.90%
▷ Private methods132.93%
Functions178
▷ Named functions3921.91%
▷ Anonymous functions13978.09%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/maan-icon.png2.46KB2.12KB▼ 13.70%