84% tutexp-rest-api-menu

Code Review | Tutexp Rest Api Menu

WordPress plugin Tutexp Rest Api Menu scored84%from 54 tests.

About plugin

  • Plugin page: tutexp-rest-api-menu
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2017
  • Latest release: Dec 17, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tapos007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /607 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.69MB] [CPU: ▼17.84ms] Passed 4 tests

Analyzing server-side resources used by Tutexp Rest Api Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.28 ▼2.90
Dashboard /wp-admin3.32 ▼0.0357.41 ▼7.47
Posts /wp-admin/edit.php3.37 ▲0.0149.27 ▲0.50
Add New Post /wp-admin/post-new.php3.13 ▼2.7637.18 ▼61.50
Media Library /wp-admin/upload.php3.24 ▲0.0136.65 ▲6.63

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Tutexp Rest Api Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.141.73 ▼0.0744.15 ▼0.14
Dashboard /wp-admin2,209 ▲215.86 ▲0.00106.49 ▼5.6239.61 ▼4.65
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0037.95 ▲1.5636.82 ▲2.18
Add New Post /wp-admin/post-new.php1,514 ▼1417.50 ▼5.68690.35 ▲20.8757.55 ▼1.27
Media Library /wp-admin/upload.php1,385 ▼34.17 ▲0.02100.18 ▼3.3546.28 ▼5.78

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tutexp-rest-api-menu/tutexp_rest_api_v2_menu.php:84

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === tutexp-rest-api-menu === )
The official readme.txt is a good inspiration

tutexp-rest-api-menu/tutexp_rest_api_v2_menu.php 92% from 13 tests

The main PHP file in "Tutexp Rest Api Menu" ver. 1.0.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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tutexp-rest-api-menu.php" instead of "tutexp_rest_api_v2_menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162058

PHP code Passed 2 tests

Analyzing 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.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.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
No PNG files were detected