84% cardboard

Code Review | Cardboard

WordPress plugin Cardboard scored84%from 54 tests.

About plugin

  • Plugin page: cardboard
  • Plugin version: 4.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7
  • WordPress version: 6.3.1
  • First release: Feb 6, 2016
  • Latest release: Dec 16, 2016
  • Number of updates: 16
  • Update frequency: every 19.7 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /6,950 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.66ms] Passed 4 tests

Analyzing server-side resources used by Cardboard
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.77 ▼11.14
Dashboard /wp-admin3.31 ▲0.0151.51 ▼4.93
Posts /wp-admin/edit.php3.37 ▲0.0147.40 ▼3.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.94 ▼18.95
Media Library /wp-admin/upload.php3.24 ▲0.0140.72 ▲3.50

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Cardboard
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14114.44 ▲0.1618.08 ▲16.3446.41 ▼2.07
Dashboard /wp-admin2,198 ▲245.59 ▼0.0885.67 ▼17.3140.35 ▼6.03
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0335.53 ▼2.4631.69 ▼6.19
Add New Post /wp-admin/post-new.php1,528 ▲222.90 ▼0.83637.46 ▼51.8650.00 ▼3.86
Media Library /wp-admin/upload.php1,397 ▼04.23 ▲0.04104.76 ▼14.1546.39 ▼2.77

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cardboard/cardboard.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
4 plugin tags: cardboard, theta, photo, 360

cardboard/cardboard.php 92% from 13 tests

The entry point to "Cardboard" version 4.7.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,162 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript499923
PHP13228239

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods325.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin