83% flipping-cards

Code Review | Flipping Cards

WordPress plugin Flipping Cards scored83%from 54 tests.

About plugin

  • Plugin page: flipping-cards
  • Plugin version: 1.30
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: Jul 31, 2023
  • Number of updates: 47
  • Update frequency: every 58.4 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /11,424 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.31ms] Passed 4 tests

Analyzing server-side resources used by Flipping Cards
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.61 ▼1.08
Dashboard /wp-admin3.37 ▲0.0751.24 ▲5.86
Posts /wp-admin/edit.php3.49 ▲0.1456.65 ▲15.22
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.01 ▼11.58
Media Library /wp-admin/upload.php3.28 ▲0.0539.68 ▲5.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: 2 new tables, 6 new options
New tables
wp_flipping_cards
wp_flipping_cards_images
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Flipping Cards
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21515.10 ▲0.761.82 ▲0.1742.00 ▼4.20
Dashboard /wp-admin2,341 ▲1536.39 ▲0.40130.17 ▲14.6493.94 ▲46.96
Posts /wp-admin/edit.php2,262 ▲1733.36 ▲1.3855.40 ▲17.8173.66 ▲40.84
Add New Post /wp-admin/post-new.php1,526 ▼1717.52 ▼0.65664.51 ▼4.4538.99 ▼19.17
Media Library /wp-admin/upload.php1,401 ▲194.09 ▼0.1984.45 ▼12.5387.24 ▲44.04

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/flipping-cards/flipping-cards.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/flipping-cards/views/card.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/flipping-cards/views/cards.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === flipping-cards === )
Please take inspiration from this readme.txt

flipping-cards/flipping-cards.php 85% from 13 tests

The principal PHP file in "Flipping Cards" v. 1.30 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")
  • Domain Path: Prefix the domain path with a forward slash character ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected486 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP345242381
CSS2700105

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/images.png1.49KB1.53KB0.00%
images/fb.png1.59KB1.00KB▼ 37.42%
images/icon.png0.26KB0.17KB▼ 32.44%
images/save.png0.54KB0.39KB▼ 28.11%
images/remove.png1.27KB1.20KB▼ 5.76%