78% better-rest-apis-for-mobile-apps-by-sapricami

Code Review | Better REST_APIs for Mobile Apps

WordPress plugin Better REST_APIs for Mobile Apps scored78%from 54 tests.

About plugin

  • Plugin page: better-rest-apis-...
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Aug 17, 2019
  • Latest release: Aug 17, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ankursinghagra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /623 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: ▼0.64MB] [CPU: ▼20.00ms] Passed 4 tests

An overview of server-side resources used by Better REST_APIs for Mobile Apps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.58 ▼4.46
Dashboard /wp-admin3.35 ▲0.0050.92 ▼17.82
Posts /wp-admin/edit.php3.40 ▲0.0449.92 ▲6.84
Add New Post /wp-admin/post-new.php3.23 ▼2.6636.95 ▼61.73
Media Library /wp-admin/upload.php3.27 ▲0.0439.36 ▲4.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Better REST_APIs for Mobile Apps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.87 ▲0.0243.75 ▲0.54
Dashboard /wp-admin2,192 ▲185.56 ▼0.0683.04 ▼6.7742.66 ▼0.97
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0437.99 ▲1.5636.06 ▲1.67
Add New Post /wp-admin/post-new.php1,527 ▼123.30 ▼0.12660.32 ▼38.1153.24 ▼17.67
Media Library /wp-admin/upload.php1,400 ▲64.25 ▲0.0796.90 ▼12.1942.31 ▼3.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/better-rest-apis-for-mobile-apps-by-sapricami/sapricami-simple-rest-api.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-rest-apis-for-mobile-apps-by-sapricami/basic_wp_functions/rest_functions.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: cordova, angular, ionic, mobile, rest...

better-rest-apis-for-mobile-apps-by-sapricami/sapricami-simple-rest-api.php 85% from 13 tests

The entry point to "Better REST_APIs for Mobile Apps" version 0.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("better-rest-apis-for-mobile-apps-by-sapricami.php" instead of "sapricami-simple-rest-api.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin233 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34720209
Markdown112024

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods375.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions538.46%
▷ Anonymous functions861.54%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin