84% poc-pour-ou-contre

Code Review | POC : Pour ou contre

WordPress plugin POC : Pour ou contre scored84%from 54 tests.

About plugin

  • Plugin page: poc-pour-ou-contre
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Jul 24, 2019
  • Latest release: Nov 29, 2019
  • Number of updates: 6
  • Update frequency: every 21.3 days
  • Top authors: studioowlie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.06ms] Passed 4 tests

Analyzing server-side resources used by POC : Pour ou contre
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0324.89 ▼14.71
Dashboard /wp-admin3.36 ▲0.0544.97 ▼6.39
Posts /wp-admin/edit.php3.47 ▲0.1145.28 ▼0.75
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.36 ▼10.40
Media Library /wp-admin/upload.php3.28 ▲0.0535.96 ▲6.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

POC : Pour ou contre: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲13813.28 ▼0.882.31 ▲0.5141.90 ▼2.34
Dashboard /wp-admin2,219 ▲315.80 ▲0.8995.57 ▼20.4638.63 ▼4.80
Posts /wp-admin/edit.php2,105 ▲192.02 ▼0.0035.23 ▲0.8732.11 ▲0.01
Add New Post /wp-admin/post-new.php1,546 ▲2623.23 ▲0.25659.54 ▲0.3454.49 ▼5.18
Media Library /wp-admin/upload.php1,407 ▲164.28 ▲0.0894.15 ▼2.2543.89 ▲1.55

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-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/poc-pour-ou-contre/admin/partials/poc-pouroucontre-admin-display.php
    • > /wp-content/plugins/poc-pour-ou-contre/public/partials/poc-pouroucontre-public-display.php

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: comments, spam

poc-pour-ou-contre/poc-pouroucontre.php 85% from 13 tests

"POC : Pour ou contre" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("poc-pour-ou-contre.php" instead of "poc-pouroucontre.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected213 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12119536207
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin