73% creative-tim-rotating-css-cards

Code Review | Creative Tim's Rotating CSS Cards

WordPress plugin Creative Tim's Rotating CSS Cards scored73%from 54 tests.

About plugin

  • Plugin page: creative-tim-rota...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2015
  • Latest release: Apr 1, 2015
  • Number of updates: 13
  • Update frequency: every 2.7 days
  • Top authors: Hudson Atwell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,692 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.22MB] [CPU: ▼45.66ms] Passed 4 tests

A check of server-side resources used by Creative Tim's Rotating CSS Cards
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.7113.04 ▼30.64
Dashboard /wp-admin2.83 ▼0.5215.96 ▼36.34
Posts /wp-admin/edit.php2.83 ▼0.5716.16 ▼35.22
Add New Post /wp-admin/post-new.php2.83 ▼3.1017.32 ▼80.45
Media Library /wp-admin/upload.php2.83 ▼0.4414.64 ▼23.41

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Creative Tim's Rotating CSS Cards
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.37 ▼0.121.77 ▼0.1640.96 ▼0.33
Dashboard /wp-admin2,198 ▲275.57 ▼0.0085.82 ▼7.6643.17 ▼0.41
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0235.09 ▼2.4339.77 ▲2.63
Add New Post /wp-admin/post-new.php1,526 ▼023.29 ▲0.10639.93 ▼57.8351.65 ▼0.22
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0498.17 ▼15.9040.93 ▼7.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/creative-tim-rotating-css-cards/creative-tim-css-cards.php+188
    Use of undefined constant INBOUND_PRO_SLUG - assumed 'INBOUND_PRO_SLUG' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/creative-tim-rotating-css-cards/creative-tim-css-cards.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/creative-tim-rotating-css-cards/creative-tim-css-cards.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: "mailto:hudson.atwell@gmail.com"
The official readme.txt is a good inspiration

creative-tim-rotating-css-cards/creative-tim-css-cards.php 77% from 13 tests

"Creative Tim's Rotating CSS Cards" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("creative-tim-rotating-css-cards.php" instead of "creative-tim-css-cards.php")
  • Domain Path: The domain path points to a folder that does not exist ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin6,393 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,083216,230
PHP13233131
Markdown17032

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods583.33%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.72MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/rotating_card_profile3.png4.97KB0.00KB▼ 100.00%
assets/images/rotating_card_thumb2.png266.69KB74.99KB▼ 71.88%
assets/images/rotating_card_profile2.png22.52KB13.52KB▼ 39.95%
assets/images/rotating_card_profile.png95.60KB36.91KB▼ 61.39%
assets/images/rotating_card_thumb.png137.98KB50.98KB▼ 63.06%