74% wp-base-translate

Code Review | WP Base Translate

WordPress plugin WP Base Translate scored74%from 54 tests.

About plugin

  • Plugin page: wp-base-translate
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2017
  • Latest release: May 22, 2020
  • Number of updates: 10
  • Update frequency: every 117.9 days
  • Top authors: GeroNikolov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /984 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.83ms] Passed 4 tests

This is a short check of server-side resources used by WP Base Translate
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.16 ▼3.83
Dashboard /wp-admin3.34 ▲0.0446.49 ▲4.96
Posts /wp-admin/edit.php3.39 ▲0.0345.84 ▼4.44
Add New Post /wp-admin/post-new.php5.95 ▲0.0698.57 ▼2.44
Media Library /wp-admin/upload.php3.26 ▲0.0334.08 ▼0.59
All Languages /wp-admin/edit.php?post_type=language3.3034.62
Add New /wp-admin/post-new.php?post_type=language3.3345.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_page_language_relations
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Base Translate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.27 ▼1.481.68 ▼0.0941.03 ▼8.25
Dashboard /wp-admin2,237 ▲515.88 ▼0.06103.76 ▼16.6338.04 ▼9.23
Posts /wp-admin/edit.php2,120 ▲282.08 ▲0.0936.86 ▼5.0133.41 ▼4.30
Add New Post /wp-admin/post-new.php6,277 ▲4,74926.00 ▲7.75812.98 ▲203.0053.11 ▼5.28
Media Library /wp-admin/upload.php1,419 ▲344.26 ▼0.0593.03 ▼12.1240.38 ▼1.89
All Languages /wp-admin/edit.php?post_type=language1,0981.9530.0529.43
Add New /wp-admin/post-new.php?post_type=language1,7203.5666.4935.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_page_language_relations
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-base-translate/wp-base-translate.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-base-translate === )
You can take inspiration from this readme.txt

wp-base-translate/wp-base-translate.php Passed 13 tests

"WP Base Translate" version 3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
This plugin is used to translate Posts, Pages & every other elements from CPT.

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
There were no executable files found in this plugin492 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3101140411
JavaScript12028
Sass17028
CSS11125

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin