88% jm-buddy-translate

Code Review | JM Buddy Translate

WordPress plugin JM Buddy Translate scored 88% from 54 tests.

About plugin

  • Plugin page: jm-buddy-translate
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.3
  • WordPress version: 5.8.1
  • First release: Apr 7, 2017
  • Latest release: Nov 9, 2017
  • Number of updates: 10
  • Update frequency: every 21.6 days
  • Top authors: Jonathan.Moore@bcs.org (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,078 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼143.05ms] Passed 4 tests

A check of server-side resources used by JM Buddy Translate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0838.41 ▲3.90
Dashboard /wp-admin3.14 ▲0.0942.42 ▲9.01
Posts /wp-admin/edit.php3.22 ▲0.1143.06 ▼8.88
Add New Post /wp-admin/post-new.php5.49 ▲0.0684.72 ▼564.21
Media Library /wp-admin/upload.php3.08 ▲0.0831.58 ▼3.00
BuddyTranslate /wp-admin/options-general.php?page=jm-buddy-translate3.0531.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

JM Buddy Translate: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,929 ▲29216.23 ▲0.2610.61 ▲1.8343.92 ▼5.74
Dashboard /wp-admin3,046 ▲1155.88 ▼0.09134.08 ▼14.21121.10 ▲3.24
Posts /wp-admin/edit.php2,795 ▲562.70 ▲0.0167.99 ▼0.4491.82 ▲7.74
Add New Post /wp-admin/post-new.php1,531 ▼34518.84 ▼0.36357.51 ▼7.87110.84 ▼1.37
Media Library /wp-admin/upload.php1,866 ▲594.99 ▼0.02154.14 ▲5.54114.09 ▼3.11
BuddyTranslate /wp-admin/options-general.php?page=jm-buddy-translate1,2032.0951.8282.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jm-buddy-translate/jm-buddy-translate.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jm-buddy-translate/jm-buddy-translate-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/jm-buddy-translate/uninstall.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: locale, buddypress, bbpress, language, back-end...

jm-buddy-translate/jm-buddy-translate.php 92% from 13 tests

The principal PHP file in "JM Buddy Translate" v. 1.0.9 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,026 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP361125422
JavaScript223141300
PO File48892256
CSS221048

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.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods1191.67%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions10
▷ Named functions10100.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 files were detected