78% wp-cldr

Code Review | WP CLDR

WordPress plugin WP CLDR scored78%from 54 tests.

About plugin

  • Plugin page: wp-cldr
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2016
  • Latest release: Mar 22, 2016
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: stuwest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,016 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.77ms] 75% from 4 tests

This is a short check of server-side resources used by WP CLDR
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 510.88ms on /wp-admin/options-general.php?page=wp-cldr)
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.54 ▼4.24
Dashboard /wp-admin3.31 ▲0.0144.71 ▼1.78
Posts /wp-admin/edit.php3.36 ▲0.0047.57 ▲4.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.50 ▼8.21
Media Library /wp-admin/upload.php3.23 ▲0.0035.07 ▼0.86
WP CLDR /wp-admin/options-general.php?page=wp-cldr6.31510.88

Server storage [IO: ▲20.64MB] [DB: ▲0.05MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 713 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WP CLDR: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.17 ▼1.111.70 ▼0.4340.50 ▼4.28
Dashboard /wp-admin2,210 ▲224.84 ▼0.02103.99 ▼0.5238.65 ▼5.35
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0539.60 ▲5.3134.20 ▲0.86
Add New Post /wp-admin/post-new.php1,536 ▼223.42 ▲0.05648.04 ▼25.1563.31 ▲10.82
Media Library /wp-admin/upload.php1,392 ▲44.15 ▼0.0895.76 ▼1.5942.01 ▼0.15
WP CLDR /wp-admin/options-general.php?page=wp-cldr2,9652.0224.26107.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-cldr/prune-cldr-files.php
  • 408× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 47
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 52
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 75
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 52
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 75
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 52
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 52
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 52
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 47
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/wp-cldr/prune-cldr-files.php on line 47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: localization, i18n, internationalization, unicode, cldr...

wp-cldr/wp-cldr.php 85% from 13 tests

The main PHP file in "WP CLDR" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 296 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 plugin636,418 lines of code in 710 files:
LanguageFilesBlank linesComment linesLines of code
JSON70300635,565
PHP4186424808
Bourne Shell2151831
XML10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity30.00
▷ Minimum class complexity5.00
▷ Maximum class complexity55.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods55
▷ Static methods59.09%
▷ Public methods5294.55%
▷ Protected methods00.00%
▷ Private methods35.45%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin