72% mealingua

Code Review | Mealingua Posts and Pages Translations

WordPress plugin Mealingua Posts and Pages Translations scored72%from 54 tests.

About plugin

  • Plugin page: mealingua
  • Plugin version: 2.0.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.2
  • WordPress version: 6.3.1
  • First release: Feb 13, 2012
  • Latest release: Jun 24, 2019
  • Number of updates: 361
  • Update frequency: every 7.5 days
  • Top authors: RealMag777 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /8,972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▲2.95ms] Passed 4 tests

A check of server-side resources used by Mealingua Posts and Pages Translations
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2248.07 ▲4.75
Dashboard /wp-admin3.52 ▲0.2257.65 ▲7.34
Posts /wp-admin/edit.php3.63 ▲0.2762.90 ▲12.96
Add New Post /wp-admin/post-new.php6.11 ▲0.2397.81 ▼7.11
Media Library /wp-admin/upload.php3.44 ▲0.2146.45 ▲6.80
Add New /wp-admin/post-new.php?post_type=mealingua3.6764.40
Mealingua /wp-admin/edit.php?post_type=mealingua3.4754.98
Languages /wp-admin/edit-tags.php?taxonomy=languages&post_type=mealingua3.4444.53
Settings /wp-admin/edit.php?post_type=mealingua&page=settings3.4442.15

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Mealingua Posts and Pages Translations
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲23013.80 ▼0.555.84 ▲3.9241.41 ▼0.39
Dashboard /wp-admin2,280 ▲775.11 ▲0.07114.68 ▲5.4940.07 ▼3.61
Posts /wp-admin/edit.php2,194 ▲942.45 ▲0.4043.26 ▲5.7337.59 ▲2.02
Add New Post /wp-admin/post-new.php6,272 ▲4,73819.02 ▼4.02899.85 ▲276.9037.63 ▼18.38
Media Library /wp-admin/upload.php1,472 ▲754.54 ▲0.37105.06 ▼0.5041.99 ▼6.25
Add New /wp-admin/post-new.php?post_type=mealingua2,7818.14185.82139.74
Mealingua /wp-admin/edit.php?post_type=mealingua1,1372.4337.2330.03
Languages /wp-admin/edit-tags.php?taxonomy=languages&post_type=mealingua1,3742.2632.9331.58
Settings /wp-admin/edit.php?post_type=mealingua&page=settings1,0392.4336.1132.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/mealingua/views/manual/post_flags_panel.php
    • > /wp-content/plugins/mealingua/index.php
    • > /wp-content/plugins/mealingua/views/post_flags_panel.php
    • > /wp-content/plugins/mealingua/views/settings.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_reset_query() in wp-content/plugins/mealingua/views/draw_post_content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mealingua/views/posts_selector_meta_box.php:1
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/mealingua/views/post_flags_panel.php on line 32
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/mealingua/views/post_flags_panel.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/mealingua/views/post_languages_box.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=mealingua
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at Object.init (/wp-content/plugins/mealingua/js/admin.js?ver=6.3.1:16:57)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/mealingua/js/admin.js?ver=6.3.1:163:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=mealingua
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mealingua&page=settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at Object.init (/wp-content/plugins/mealingua/js/admin.js?ver=6.3.1:16:57)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/mealingua/js/admin.js?ver=6.3.1:163:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mealingua&page=settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No plugin tags provided

mealingua/index.php 92% from 13 tests

The main PHP file in "Mealingua Posts and Pages Translations" ver. 2.0.6.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mealingua.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,287 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP713544840
PO File7265530655
CSS41237568
JavaScript44641224

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity35.50
▷ Minimum class complexity6.00
▷ Maximum class complexity65.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods38100.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/banners/woof_banner.png59.58KB24.13KB▼ 59.49%
images/codecanyon_banner.png173.12KB57.43KB▼ 66.83%