79% acnoo-flutter-api

Code Review | Acnoo Flutter API

WordPress plugin Acnoo Flutter API scored79%from 54 tests.

About plugin

  • Plugin page: acnoo-flutter-api
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 15, 2023
  • Latest release: Sep 19, 2023
  • Number of updates: 10
  • Update frequency: every 9.9 days
  • Top authors: arafatjamil01 (70%)acnoo (40%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.74MB] [CPU: ▲14.70ms] Passed 4 tests

Analyzing server-side resources used by Acnoo Flutter API
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.23 ▲2.7762.14 ▲21.44
Dashboard /wp-admin6.07 ▲2.7270.81 ▲1.74
Posts /wp-admin/edit.php6.12 ▲2.7668.17 ▲21.73
Add New Post /wp-admin/post-new.php8.92 ▲3.04112.82 ▲13.87
Media Library /wp-admin/upload.php5.93 ▲2.7062.23 ▲29.32

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
maanstore_purchase_code
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
afa_elements
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Acnoo Flutter API
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3714.35 ▼0.031.73 ▼0.2941.99 ▼1.82
Dashboard /wp-admin2,217 ▲435.64 ▲0.0686.66 ▼17.9537.85 ▼9.57
Posts /wp-admin/edit.php2,119 ▲192.01 ▲0.0039.94 ▲2.0935.60 ▲2.65
Add New Post /wp-admin/post-new.php1,543 ▲1722.80 ▼0.26633.22 ▲13.5362.38 ▲12.37
Media Library /wp-admin/upload.php1,419 ▲194.21 ▲0.05102.94 ▼2.5740.77 ▼7.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • afa_elements
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • maanstore_purchase_code

Smoke tests 50% from 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 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/acnoo-flutter-api/includes/flutter-api/templates/admin/afa-user-config.php
  • 33× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/templates/admin/afa-admin-navigation.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/templates/afa-admin-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/controllers/flutter-booking.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/templates/admin/afa-admin-activation.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/maan-flutter-config.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/controllers/flutter-midtrans.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/controllers/flutter-blog.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Products_Controller' not found in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/controllers/flutter-products.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/controllers/flutter-myfatoorah.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/acnoo-flutter-api/includes/flutter-api/controllers/listing-rest-api/class.api.fields.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: android, rest, maanstore, api, react-native...

acnoo-flutter-api/acnoo-flutter-api.php Passed 13 tests

The principal PHP file in "Acnoo Flutter API" v. 1.0.5 is loaded by WordPress automatically on each request
103 characters long description:
The Acnoo Flutter API Plugin which is used for REST API configurations of mobile apps created by Acnoo.

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 detected20,729 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP502,6712,06420,344
CSS2261209
JavaScript1110176

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity69.97
▷ Minimum class complexity1.00
▷ Maximum class complexity396.00
Average method complexity6.93
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods471
▷ Static methods112.34%
▷ Public methods41988.96%
▷ Protected methods357.43%
▷ Private methods173.61%
Functions190
▷ Named functions4423.16%
▷ Anonymous functions14676.84%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.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
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%