10% country-caching-extension-for-wp-super-cache

Code Review | Country Caching For WP Super Cache

WordPress plugin Country Caching For WP Super Cache scored10%from 54 tests.

About plugin

  • Plugin page: country-caching-e...
  • Plugin version: 0.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.6
  • WordPress version: 6.3.1
  • First release: Mar 18, 2015
  • Latest release: Mar 24, 2021
  • Number of updates: 24
  • Update frequency: every 91.6 days
  • Top authors: wrigs1 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /5,100 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/country-caching-extension-for-wp-super-cache/inc/ccwpsc_settings_form.php+781
    mkdir(): Invalid path

Server metrics [RAM: ▼1.67MB] [CPU: ▼54.83ms] Passed 4 tests

An overview of server-side resources used by Country Caching For WP Super Cache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0241.50 ▼6.25
Dashboard /wp-admin2.54 ▼1.029.89 ▼49.94
Posts /wp-admin/edit.php2.55 ▼1.139.73 ▼51.26
Add New Post /wp-admin/post-new.php2.54 ▼3.609.21 ▼86.43
Media Library /wp-admin/upload.php2.55 ▼0.948.01 ▼31.68

Server storage [IO: ▲0.31MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
CCWPSC_VERSION
theysaidso_admin_options
ccwpsc_caching_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Country Caching For WP Super Cache
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.26 ▼0.131.86 ▲0.2741.69 ▼4.42
Dashboard /wp-admin2,211 ▲315.65 ▲0.0089.23 ▼2.3037.85 ▼6.16
Posts /wp-admin/edit.php2,116 ▲162.04 ▲0.0739.97 ▼1.9535.35 ▼5.76
Add New Post /wp-admin/post-new.php1,559 ▲1423.12 ▼0.05677.21 ▲21.9952.27 ▲1.49
Media Library /wp-admin/upload.php1,419 ▲194.25 ▲0.0499.43 ▼3.7041.28 ▼6.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/country-caching-extension-for-wp-super-cache/inc/ccwpsc_settings_form.php+781
    mkdir(): Invalid path
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires php: Version format is invalid
  • Screenshots: Please add an image for screenshot #1 (Simple set up. Dashboard->WPSC Country Caching)
The official readme.txt is a good inspiration

country-caching-extension-for-wp-super-cache/cc_wpsc_init.php 92% from 13 tests

The entry point to "Country Caching For WP Super Cache" version 0.8.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("country-caching-extension-for-wp-super-cache.php" instead of "cc_wpsc_init.php")

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
Success! There were no dangerous files found in this plugin2,573 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP132752591,617
Pascal41454,698919
CSS16037

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity42.00
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity5.78
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods60
▷ Static methods11.67%
▷ Public methods3253.33%
▷ Protected methods610.00%
▷ Private methods2236.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants23100.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