84% langtolang-dictionary

Code Review | Langtolang Dictionary

WordPress plugin Langtolang Dictionary scored 84% from 54 tests.

About plugin

  • Plugin page: langtolang-dictio...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2009
  • Latest release: Aug 19, 2017
  • Number of updates: 7
  • Update frequency: every 440.9 days
  • Top authors: gunebakan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Langtolang Dictionary
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.58 ▼0.98
Dashboard /wp-admin3.32 ▲0.0144.68 ▼8.42
Posts /wp-admin/edit.php3.37 ▲0.0144.48 ▼8.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.95 ▼12.39
Media Library /wp-admin/upload.php3.24 ▲0.0135.44 ▼10.31

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Langtolang Dictionary
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.75 ▼0.621.70 ▼0.1439.19 ▼13.66
Dashboard /wp-admin2,209 ▲215.88 ▲1.0493.90 ▼10.6138.75 ▼7.93
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0935.54 ▼6.2132.30 ▼6.20
Add New Post /wp-admin/post-new.php1,533 ▼923.14 ▼0.39696.50 ▼114.6653.25 ▼20.58
Media Library /wp-admin/upload.php1,391 ▲94.19 ▲0.0195.99 ▼0.4341.76 ▼1.35

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

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just 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/langtolang-dictionary/langtolang-dictionary.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 37 tag instead of maximum 10
The official readme.txt might help

langtolang-dictionary/langtolang-dictionary.php 92% from 13 tests

"Langtolang Dictionary" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 460 characters long)

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
No dangerous file extensions were detected135 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11327135

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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