79% century-toolkit

Code Review | Century ToolKit

WordPress plugin Century ToolKit scored79%from 54 tests.

About plugin

  • Plugin page: century-toolkit
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.6
  • WordPress version: 6.3.1
  • First release: Mar 8, 2019
  • Latest release: Jan 14, 2021
  • Number of updates: 17
  • Update frequency: every 39.9 days
  • Top authors: themecentury (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /50,485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▲0.19ms] Passed 4 tests

This is a short check of server-side resources used by Century ToolKit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1245.77 ▲1.95
Dashboard /wp-admin3.51 ▲0.1656.31 ▲2.34
Posts /wp-admin/edit.php3.62 ▲0.2247.92 ▼2.98
Add New Post /wp-admin/post-new.php6.09 ▲0.16113.85 ▲19.64
Media Library /wp-admin/upload.php3.43 ▲0.1642.42 ▼0.53
Import Demos /wp-admin/themes.php?page=century-toolkit-install-demos3.41360.49

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

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

Browser metrics Passed 4 tests

Century ToolKit: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5814.39 ▲1.221.97 ▼2.3042.28 ▲3.52
Dashboard /wp-admin2,202 ▲255.64 ▲0.1090.46 ▼15.1937.39 ▼20.97
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0334.25 ▼0.3737.18 ▼1.83
Add New Post /wp-admin/post-new.php1,529 ▲123.45 ▲0.35689.38 ▲8.7552.37 ▲4.74
Media Library /wp-admin/upload.php1,398 ▼24.18 ▲0.02100.31 ▼8.7746.60 ▼1.96
Import Demos /wp-admin/themes.php?page=century-toolkit-install-demos8462.2125.7428.18

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • century_toolkit_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • century_toolkit_upload_dir_created
    • widget_recent-comments
    • widget_recent-posts

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
Almost there, just fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=century-toolkit-install-demos
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=century-toolkit-install-demos
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/century-toolkit/includes/century-toolkit-demo-data.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
8 plugin tags: menus, demo, content, data, settings...

century-toolkit/century-toolkit.php Passed 13 tests

"Century ToolKit" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
125 characters long description:
Century ToolKit is specially developed for themecentury themes. This plugin help to import demo content and related settings.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin3,250 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP126226502,329
CSS2900583
JavaScript213465338

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity38.25
▷ Minimum class complexity3.00
▷ Maximum class complexity186.00
Average method complexity6.02
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes216.67%
Methods89
▷ Static methods1314.61%
▷ Public methods8292.13%
▷ Protected methods11.12%
▷ Private methods66.74%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin