83% wp-rest-api-multilanguage-over-wmpl

Code Review | WP REST API multilanguage (over WMPL)

WordPress plugin WP REST API multilanguage (over WMPL) scored83%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-multi...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 2, 2015
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: elemind (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,551 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.85ms] Passed 4 tests

Server-side resources used by WP REST API multilanguage (over WMPL)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.96 ▼2.25
Dashboard /wp-admin3.31 ▼0.0457.85 ▼8.14
Posts /wp-admin/edit.php3.36 ▲0.0051.49 ▼0.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.65 ▼12.37
Media Library /wp-admin/upload.php3.23 ▲0.0038.21 ▲0.73

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WP REST API multilanguage (over WMPL): an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.142.18 ▲0.5644.08 ▲3.02
Dashboard /wp-admin2,198 ▲215.62 ▼0.0583.32 ▼3.9940.17 ▼3.48
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0439.54 ▲3.7035.03 ▲1.02
Add New Post /wp-admin/post-new.php1,526 ▼1123.06 ▲4.81678.04 ▲9.9158.58 ▼11.57
Media Library /wp-admin/upload.php1,403 ▲64.35 ▼0.06110.61 ▲1.6348.78 ▲2.17

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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/wp-rest-api-multilanguage-over-wmpl/wpml-to-wp-api.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-rest-api-multilanguage-over-wmpl === )
  • Screenshots: Screenshot #1 (No screenshots since this works in the background.) image required
Please take inspiration from this readme.txt

wp-rest-api-multilanguage-over-wmpl/wpml-to-wp-api.php 92% from 13 tests

The main PHP script in "WP REST API multilanguage (over WMPL)" version 0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-rest-api-multilanguage-over-wmpl.php" instead of "wpml-to-wp-api.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected49 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP171136
Markdown18013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin