74% wpcode-content-ratio

Code Review | WPCode Content Ratio

WordPress plugin WPCode Content Ratio scored74%from 54 tests.

About plugin

  • Plugin page: wpcode-content-ratio
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: May 5, 2014
  • Number of updates: 14
  • Update frequency: every 38.4 days
  • Top authors: funlove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,383 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲6.95ms] Passed 4 tests

Server-side resources used by WPCode Content Ratio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.38 ▲3.99
Dashboard /wp-admin3.32 ▲0.0246.13 ▼0.81
Posts /wp-admin/edit.php3.38 ▲0.0393.59 ▲44.23
Add New Post /wp-admin/post-new.php5.90 ▲0.02120.70 ▲26.34
Media Library /wp-admin/upload.php3.25 ▲0.0231.24 ▼1.74

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
myplugin_version
widget_recent-comments
wpcode_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPCode Content Ratio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.47 ▲0.031.76 ▼0.0543.88 ▼0.61
Dashboard /wp-admin2,236 ▲454.94 ▼0.9697.66 ▼0.2987.04 ▲42.20
Posts /wp-admin/edit.php2,149 ▲602.01 ▲0.0438.06 ▼2.2533.90 ▼7.94
Add New Post /wp-admin/post-new.php1,549 ▲718.43 ▲0.08696.34 ▲86.3755.55 ▼15.72
Media Library /wp-admin/upload.php1,412 ▲244.27 ▲0.0897.67 ▲0.8979.85 ▲38.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wpcode-content-ratio/index.php+79
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • myplugin_version
    • db_upgraded
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpcode-content-ratio/index.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (WPCode Content Ratio > Purpouse and home ratio detail), #2 (WPCode Content Ratio > Config page)
The official readme.txt is a good inspiration

wpcode-content-ratio/index.php 92% from 13 tests

This is the main PHP file of "WPCode Content Ratio" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpcode-content-ratio.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,551 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP175156980
PO File2321463560
CSS2156
JavaScript1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/img/perc.png0.35KB0.24KB▼ 29.94%
media/img/googleplus.png0.68KB0.70KB0.00%
media/img/twitter.png0.67KB0.71KB0.00%
media/img/icono.png0.72KB0.65KB▼ 9.10%
media/img/linkedin.png0.95KB0.99KB0.00%