84% wpcdnkoloss

Code Review | Kolossum - cdnJS for Wordpress

WordPress plugin Kolossum - cdnJS for Wordpress scored84%from 54 tests.

About plugin

  • Plugin page: wpcdnkoloss
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.0
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Apr 27, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wearekolossum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.17ms] Passed 4 tests

Analyzing server-side resources used by Kolossum - cdnJS for Wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.06 ▲1.76
Dashboard /wp-admin3.33 ▲0.0248.95 ▼7.77
Posts /wp-admin/edit.php3.38 ▲0.0251.08 ▼1.94
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.52 ▼8.72
Media Library /wp-admin/upload.php3.25 ▲0.0241.33 ▲6.30
wpCdnKoloss /wp-admin/themes.php?page=wpcdnkoloss/admin/tpl/view.php3.2733.79

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: 1 new table, 6 new options
New tables
wp_wpcdnkoloss_files
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Kolossum - cdnJS for Wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.22 ▼0.341.61 ▼0.7339.65 ▼5.62
Dashboard /wp-admin2,213 ▲335.66 ▼0.0293.39 ▲6.3041.99 ▼2.15
Posts /wp-admin/edit.php2,115 ▲122.03 ▲0.0238.69 ▼0.5036.33 ▼3.10
Add New Post /wp-admin/post-new.php1,540 ▲1423.32 ▲0.03673.25 ▼52.6556.11 ▲2.00
Media Library /wp-admin/upload.php1,412 ▲154.29 ▲0.07111.16 ▲8.7247.60 ▼1.49
wpCdnKoloss /wp-admin/themes.php?page=wpcdnkoloss/admin/tpl/view.php1,0371.6925.0528.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WpCdnKolossAdmin' not found in wp-content/plugins/wpcdnkoloss/admin/tpl/view.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpCdnKoloss' not found in wp-content/plugins/wpcdnkoloss/includes/WpCdnKolossAdmin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpcdnkoloss/includes/WpCdnKoloss.php:4

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: cdnjs, cdn

wpcdnkoloss/kolossum-wpcdnkoloss.php 92% from 13 tests

The principal PHP file in "Kolossum - cdnJS for Wordpress" v. 0.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpcdnkoloss.php" instead of "kolossum-wpcdnkoloss.php")

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 plugin945 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8113204467
JavaScript175116338
CSS1374140

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.80
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin