83% cubify-wp

Code Review | Cubify WP

WordPress plugin Cubify WP scored83%from 54 tests.

About plugin

  • Plugin page: cubify-wp
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-3.9.0
  • WordPress version: 6.3.1
  • First release: May 5, 2014
  • Latest release: May 5, 2014
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: jtsternberg (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /947 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.01MB] [CPU: ▼13.69ms] Passed 4 tests

An overview of server-side resources used by Cubify WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.57 ▲0.90
Dashboard /wp-admin3.32 ▼0.0253.61 ▼13.46
Posts /wp-admin/edit.php3.37 ▲0.0248.68 ▼3.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.97 ▼38.99
Media Library /wp-admin/upload.php3.24 ▲0.0142.82 ▲2.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cubify WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.27 ▼1.154.48 ▲2.4545.42 ▲3.03
Dashboard /wp-admin2,224 ▲214.86 ▼0.04106.75 ▼0.5238.32 ▼1.02
Posts /wp-admin/edit.php2,082 ▼152.06 ▲0.0441.21 ▲3.8338.62 ▲3.67
Add New Post /wp-admin/post-new.php1,531 ▼2322.99 ▲4.91727.83 ▲80.0170.07 ▼1.70
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.04105.38 ▼4.4744.16 ▼5.51

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cubify-wp/cubify-wp.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: The plugin tags were not defined
  • Screenshots: These screenshots require images: #1 (Use a shortcode to insert a cube into your content.), #2 (The cube aligned right with content.)
You can take inspiration from this readme.txt

cubify-wp/cubify-wp.php 85% from 13 tests

The primary PHP file in "Cubify WP" version 0.1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin963 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45730911
PHP1197043
Sass1007
Markdown1102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.65MB with 0.38MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png162.30KB71.68KB▼ 55.83%
screenshot-1.png19.10KB9.93KB▼ 48.00%
images/wat.png485.19KB144.51KB▼ 70.22%