64% custom-translation-files

Code Review | Custom Translation Files

WordPress plugin Custom Translation Files scored64%from 54 tests.

About plugin

  • Plugin page: custom-translatio...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 31, 2018
  • Latest release: Oct 31, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: miunosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /686 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.74MB] [CPU: ▼5.20ms] Passed 4 tests

Analyzing server-side resources used by Custom Translation Files
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3538.86 ▲1.07
Dashboard /wp-admin4.18 ▲0.8847.10 ▼3.54
Posts /wp-admin/edit.php4.23 ▲0.8744.84 ▼0.35
Add New Post /wp-admin/post-new.php6.76 ▲0.8781.10 ▼17.97
Media Library /wp-admin/upload.php4.10 ▲0.8737.14 ▲3.81
Custom Translation Files /wp-admin/options-general.php?page=ctf_settings6.7885.06

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Translation Files
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.71 ▲0.161.97 ▲0.4545.35 ▲5.24
Dashboard /wp-admin2,202 ▲215.62 ▼0.2083.43 ▼13.7138.01 ▼6.07
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0334.65 ▼2.9234.46 ▲0.69
Add New Post /wp-admin/post-new.php1,529 ▲323.14 ▲0.01674.32 ▼21.6152.04 ▼21.14
Media Library /wp-admin/upload.php1,401 ▼24.19 ▲0.0195.22 ▼7.0741.42 ▼4.28
Custom Translation Files /wp-admin/options-general.php?page=ctf_settings1,3533.8764.6572.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/custom-translation-files/custom-translation-files.php+16
    Cannot declare class CustomTranslationFiles_Registry_Base, because the name is already in use
  • Incomplete uninstall procedure, leaving 253 files (1.11MB) in the plugin directory
    • (new file) include/library/apf/factory/_common/_abstract/_controller/AdminPageFramework_Resource_Base.php
    • (new file) include/library/apf/factory/_common/_abstract/_controller/AdminPageFramework_Link_Base.php
    • (new file) custom-translation-files.php
    • (new file) include/library/apf/factory/_common/_abstract/_controller/AdminPageFramework_HelpPane_Base.php
    • (new file) include/library/apf/admin-page-framework-include-class-list.php
    • (new file) include/library/apf/factory/_common/_abstract/AdminPageFramework_Factory.php
    • (new file) include/library/apf/LICENSE.txt
    • (new file) include/library/apf/admin-page-framework.php
    • (new file) include/CustomTranslationFiles_Bootstrap.php
    • (new file) include/class-list.php
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however 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
  • 228× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_Form_View___Script_Base' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/_common/form/_view/script/AdminPageFramework_Form_View___Script_RegisterCallback.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_PluginUtility' not found in wp-content/plugins/custom-translation-files/include/main/option/CustomTranslationFiles_Option_Base.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_Form_View___Attribute_FieldContainer_Base' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_Fieldset.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_Property_Base' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/meta_box/_model/AdminPageFramework_Property_post_meta_box.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_Form' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/admin_page/form/AdminPageFramework_Form_admin_page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_Form_View___CSS_Base' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/term_meta/form/_view/AdminPageFramework_Form_View___CSS_term_meta.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_FieldType' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/_common/form/field_type/AdminPageFramework_FieldType_export.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_Format_Base' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/_common/form/_view/sectionset/format/AdminPageFramework_Format_PageResource_Style.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_HelpPane_Base' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/taxonomy_field/_controller/AdminPageFramework_HelpPane_taxonomy_field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CustomTranslationFiles_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/custom-translation-files/include/library/apf/factory/_common/form/_model/modifier/AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements.php:7

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: text domain, localization, mo, translation, translate

custom-translation-files/custom-translation-files.php Passed 13 tests

"Custom Translation Files" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Allows you to set custom translation files for a particular text domain.

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
There were no executable files found in this plugin16,364 lines of code in 243 files:
LanguageFilesBlank linesComment linesLines of code
PHP2408412,38916,309
Markdown123051
CSS2054

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.58
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes356
▷ Abstract classes9727.25%
▷ Concrete classes25972.75%
▷ Final classes41.54%
Methods1,741
▷ Static methods24414.01%
▷ Public methods97455.94%
▷ Protected methods29416.89%
▷ Private methods47327.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants13.70%
▷ Class constants2696.30%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin