94% controllercons

Code Review | Controllercons

WordPress plugin Controllercons scored 94% from 54 tests.

About plugin

  • Plugin page: controllercons
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.9.1
  • WordPress version: 5.8.1
  • First release: Dec 14, 2017
  • Latest release: Aug 27, 2018
  • Number of updates: 8
  • Update frequency: every 32.0 days
  • Top authors: kieranmcclung (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 638 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼143.67ms] Passed 4 tests

An overview of server-side resources used by Controllercons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1437.16 ▲16.48
Dashboard /wp-admin3.09 ▲0.0443.59 ▲0.25
Posts /wp-admin/edit.php3.15 ▲0.0443.41 ▼1.35
Add New Post /wp-admin/post-new.php5.48 ▲0.0597.00 ▼569.63
Media Library /wp-admin/upload.php3.04 ▲0.0332.98 ▼3.96

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Controllercons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12715.82 ▲0.208.64 ▼0.8548.04 ▲0.32
Dashboard /wp-admin3,009 ▲756.06 ▲0.04135.04 ▼6.00113.92 ▼2.11
Posts /wp-admin/edit.php2,781 ▲422.72 ▲0.0162.46 ▼2.3594.63 ▼5.22
Add New Post /wp-admin/post-new.php1,631 ▼4122.91 ▲4.13275.62 ▼85.88114.15 ▲4.21
Media Library /wp-admin/upload.php1,856 ▲465.10 ▲0.06148.73 ▼7.21112.57 ▼8.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/controllercons/admin/admin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/controllercons/controllercons.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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: icons

controllercons/controllercons.php Passed 13 tests

"Controllercons" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Embed Controllercons video game icons directly into your site.

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 plugin746 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS55548379
PHP34113199
JavaScript12211168

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin