78% fittest

Code Review | Fittest plugin for WordPress

WordPress plugin Fittest plugin for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: fittest
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2014
  • Latest release: Feb 12, 2014
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: richardruiter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /809 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
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.76ms] Passed 4 tests

This is a short check of server-side resources used by Fittest plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2440.16 ▲2.60
Dashboard /wp-admin3.54 ▲0.2345.89 ▼3.40
Posts /wp-admin/edit.php3.59 ▲0.2352.16 ▼0.67
Add New Post /wp-admin/post-new.php6.06 ▲0.1793.38 ▼4.07
Media Library /wp-admin/upload.php3.40 ▲0.1737.63 ▼2.91
Add New /wp-admin/post-new.php?post_type=fittest_experiment4.8454.85
Experiments /wp-admin/edit.php?post_type=fittest_experiment3.5145.43

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Fittest plugin for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.80 ▲0.801.75 ▲0.1543.37 ▲0.52
Dashboard /wp-admin2,234 ▲435.86 ▼0.06108.30 ▲6.5339.55 ▼5.96
Posts /wp-admin/edit.php2,120 ▲282.05 ▲0.0540.48 ▲1.0935.01 ▼1.97
Add New Post /wp-admin/post-new.php1,551 ▲1823.23 ▲0.22643.02 ▼11.5954.82 ▲0.95
Media Library /wp-admin/upload.php1,416 ▲254.21 ▼0.0394.57 ▼17.6142.12 ▼8.06
Add New /wp-admin/post-new.php?post_type=fittest_experiment1,4822.5349.1250.44
Experiments /wp-admin/edit.php?post_type=fittest_experiment1,0811.9632.8229.60

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/fittest/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.php
  • 242× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Filter' not found in wp-content/plugins/fittest/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/fittest/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/fittest/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/fittest/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/fittest/vendor/twig/twig/lib/Twig/Loader/Chain.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/fittest/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/fittest/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fittest/vendor/twig/twig/test/Twig/Tests/escapingTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/fittest/vendor/illuminate/support/Illuminate/Support/Facades/Crypt.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fittest/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Setting up an experiment), #2 (Adding the experiment to a menu), #3 (Experiment showing up in the menu)
The official readme.txt might help

fittest/index.php 92% from 13 tests

The main file in "Fittest plugin for WordPress" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fittest.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin19,341 lines of code in 434 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123,4637,69514,720
reStructuredText882,1761,9203,071
C1166146791
JSON600324
CSS241179
HTML1472113
XML32059
JavaScript12028
YAML27025
C/C++ Header171311
SVG10011
m41215
Twig2204

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.85
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces13
Interfaces24
Traits0
Classes300
▷ Abstract classes196.33%
▷ Concrete classes28193.67%
▷ Final classes00.00%
Methods1,365
▷ Static methods1158.42%
▷ Public methods1,20788.42%
▷ Protected methods15211.14%
▷ Private methods60.44%
Functions114
▷ Named functions10491.23%
▷ Anonymous functions108.77%
Constants38
▷ Global constants12.63%
▷ Class constants3797.37%
▷ Public constants37100.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.21MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png67.19KB29.48KB▼ 56.13%
screenshot-3.png64.32KB28.38KB▼ 55.88%
screenshot-2.png86.58KB39.20KB▼ 54.72%