78% cached-l10n

Code Review | Cached l10n

WordPress plugin Cached l10n scored 78% from 54 tests.

About plugin

  • Plugin page: cached-l10n
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2013
  • Latest release: Apr 23, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: lavoiesl (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,562 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.94ms] Passed 4 tests

Server-side resources used by Cached l10n
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.55 ▼4.77
Dashboard /wp-admin3.33 ▲0.0346.41 ▼1.02
Posts /wp-admin/edit.php3.38 ▲0.0345.88 ▼3.55
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.51 ▼18.42
Media Library /wp-admin/upload.php3.25 ▲0.0236.97 ▼0.47
Cached l10n /wp-admin/tools.php?page=cached-l10n3.2230.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Cached l10n
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7813.24 ▼1.141.66 ▼0.2239.76 ▼5.90
Dashboard /wp-admin2,222 ▲345.85 ▼0.0197.74 ▼0.0641.02 ▼3.62
Posts /wp-admin/edit.php2,101 ▲121.97 ▼0.0239.11 ▼0.0835.43 ▼5.07
Add New Post /wp-admin/post-new.php1,545 ▲1023.46 ▲0.36663.69 ▲12.2562.96 ▲5.11
Media Library /wp-admin/upload.php1,404 ▲164.22 ▲0.00101.37 ▼13.7341.92 ▼5.91
Cached l10n /wp-admin/tools.php?page=cached-l10n8142.1825.8228.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=cached-l10n
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=cached-l10n
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cached-l10n/plugin.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/cached-l10n/admin_page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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
1 plugin tags: performance l10n

cached-l10n/plugin.php 85% from 13 tests

The main PHP file in "Cached l10n" ver. 0.2.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cached-l10n.php" instead of "plugin.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
There were no executable files found in this plugin180 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24537180

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected