80% motaword

Code Review | MotaWord Translation

WordPress plugin MotaWord Translation scored80%from 54 tests.

About plugin

  • Plugin page: motaword
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Feb 13, 2023
  • Number of updates: 51
  • Update frequency: every 56.4 days
  • Top authors: motaword (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,185 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼4.70ms] Passed 4 tests

This is a short check of server-side resources used by MotaWord Translation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4342.53 ▲5.50
Dashboard /wp-admin3.74 ▲0.3948.54 ▼9.80
Posts /wp-admin/edit.php3.79 ▲0.4345.04 ▼3.51
Add New Post /wp-admin/post-new.php6.28 ▲0.3984.38 ▼10.44
Media Library /wp-admin/upload.php3.60 ▲0.3736.87 ▲4.94
MotaWord /wp-admin/options-general.php?page=motaword3.5736.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for MotaWord Translation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▼0.031.75 ▲0.0444.94 ▲0.64
Dashboard /wp-admin2,206 ▲265.69 ▲0.0785.14 ▼19.5336.46 ▼3.51
Posts /wp-admin/edit.php2,135 ▲352.07 ▲0.0835.99 ▼2.3033.56 ▲0.40
Add New Post /wp-admin/post-new.php6,228 ▲4,70026.11 ▲3.11899.50 ▲213.7051.12 ▼3.31
Media Library /wp-admin/upload.php1,405 ▲54.25 ▼0.12105.50 ▼3.0546.45 ▼2.15
MotaWord /wp-admin/options-general.php?page=motaword8742.0528.6927.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 52 files (0.32MB) in the plugin directory
    • (new file) admin/css/icon_ongoing.png
    • (new file) admin/css/motaword-admin.css
    • (new file) admin/index.php
    • (new file) admin/css/icon_completed.png
    • (new file) admin/css/icon_error.png
    • (new file) README.txt
    • (new file) admin/css/logo.png
    • (new file) admin/css/icon.png
    • (new file) admin/class-motaword-admin.php
    • (new file) LICENSE.txt
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 97% 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 need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

motaword/motaword.php Passed 13 tests

The entry point to "MotaWord Translation" version 1.3.9 is a PHP file that has certain tags in its header comment area
87 characters long description:
MotaWord plugin allows you to seamlessly submit your posts for translation to MotaWord.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,652 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP135389922,327
JavaScript15739280
CSS17445

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity55.43
▷ Minimum class complexity3.00
▷ Maximum class complexity234.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods204
▷ Static methods209.80%
▷ Public methods14671.57%
▷ Protected methods4421.57%
▷ Private methods146.86%
Functions14
▷ Named functions428.57%
▷ Anonymous functions1071.43%
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
10 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/icon_completed.png2.25KB2.30KB0.00%
admin/css/icon_ongoing.png2.25KB2.30KB0.00%
trunk/admin/css/icon_completed.png2.25KB2.30KB0.00%
trunk/admin/css/logo.png2.83KB2.89KB0.00%
admin/css/icon.png2.25KB2.30KB0.00%