84% flogger

Code Review | Flogger

WordPress plugin Flogger scored84%from 54 tests.

About plugin

  • Plugin page: flogger
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Jan 26, 2014
  • Latest release: Jan 26, 2014
  • Number of updates: 3
  • Update frequency: every 9.0 days
  • Top authors: allendav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,792 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.12ms] Passed 4 tests

A check of server-side resources used by Flogger
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.16 ▲1.52
Dashboard /wp-admin3.36 ▲0.0146.41 ▼12.18
Posts /wp-admin/edit.php3.41 ▲0.0544.22 ▼0.91
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.78 ▼5.02
Media Library /wp-admin/upload.php3.28 ▲0.0534.73 ▼2.35
Exercises /wp-admin/edit-tags.php?taxonomy=floggerexercise3.2733.47

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Flogger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.74 ▲0.322.25 ▲0.3842.36 ▲1.13
Dashboard /wp-admin2,213 ▲284.90 ▼0.96112.66 ▲1.7343.18 ▼2.63
Posts /wp-admin/edit.php2,125 ▲392.01 ▼0.0036.82 ▼0.6731.19 ▼3.20
Add New Post /wp-admin/post-new.php6,211 ▲4,67818.84 ▼4.26924.69 ▲216.0355.99 ▼5.76
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.03100.50 ▼2.2944.76 ▼2.37
Exercises /wp-admin/edit-tags.php?taxonomy=floggerexercise1,2372.2629.6030.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 3× 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/flogger/inc/taxonomy.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flogger/inc/taxonomy.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/flogger/inc/post.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Adding and editing in the new post taxonomy Exercises), #2 (Adding tags and exercise amounts to your daily post), #3 (What your visitors see on your posts)
You can look at the official readme.txt

flogger/flogger.php Passed 13 tests

The main file in "Flogger" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
28 characters long description:
Fitness logger for WordPress

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 detected175 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34021175

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.50
▷ Minimum class complexity4.00
▷ Maximum class complexity17.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.27MB with 0.18MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png44.36KB14.36KB▼ 67.62%
screenshot-1.png170.31KB59.43KB▼ 65.11%
screenshot-2.png62.72KB19.96KB▼ 68.17%