84% kony-2012

Code Review | Kony 2012 Ribbon

WordPress plugin Kony 2012 Ribbon scored84%from 54 tests.

About plugin

  • Plugin page: kony-2012
  • Plugin version: 2.012
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2012
  • Latest release: Mar 8, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: tmcguire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /936 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.74ms] Passed 4 tests

Analyzing server-side resources used by Kony 2012 Ribbon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.00 ▼0.47
Dashboard /wp-admin3.31 ▲0.0046.43 ▼8.03
Posts /wp-admin/edit.php3.36 ▲0.0049.89 ▼3.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.35 ▼25.10
Media Library /wp-admin/upload.php3.23 ▲0.0038.35 ▼2.24

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Kony 2012 Ribbon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.23 ▼0.391.71 ▲0.1443.41 ▲0.92
Dashboard /wp-admin2,195 ▲155.53 ▼0.1187.80 ▼1.9639.06 ▼9.23
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0336.80 ▼5.7437.49 ▲1.15
Add New Post /wp-admin/post-new.php1,531 ▲323.15 ▲0.06690.13 ▲14.8449.90 ▼8.22
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.0298.06 ▼24.2945.79 ▼1.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kony-2012/kony2012-ribbon.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (See screenshot1.jpg to see how the plugin will look.) image required
You can take inspiration from this readme.txt

kony-2012/kony2012-ribbon.php 92% from 13 tests

This is the main PHP file of "Kony 2012 Ribbon" version 2.012, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("kony-2012.php" instead of "kony2012-ribbon.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 plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1196

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
kony2012-ribbon.png16.85KB5.46KB▼ 67.58%