62% crem-notices

Code Review | crem_notices

WordPress plugin crem_notices scored62%from 54 tests.

About plugin

  • Plugin page: crem-notices
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 24, 2015
  • Latest release: Nov 24, 2015
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: anais.id (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /559 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.81MB] [CPU: ▼37.28ms] Passed 4 tests

Analyzing server-side resources used by crem_notices
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.20 ▼0.3015.95 ▼25.41
Dashboard /wp-admin3.25 ▼0.1019.78 ▼28.32
Posts /wp-admin/edit.php3.25 ▼0.1523.23 ▼27.89
Add New Post /wp-admin/post-new.php3.25 ▼2.6822.53 ▼67.51
Media Library /wp-admin/upload.php3.25 ▼0.0221.07 ▼14.67
Auteurs /wp-admin/edit.php?post_type=auteur3.2521.05
Add New /wp-admin/post-new.php?post_type=auteur3.2521.53
Familles /wp-admin/edit-tags.php?taxonomy=famille&post_type=notice3.2521.63
Add New /wp-admin/post-new.php?post_type=notice3.2522.00
Notices /wp-admin/edit.php?post_type=notice3.2522.60
Mots-clés /wp-admin/edit-tags.php?taxonomy=mot-cle&post_type=notice3.2521.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for crem_notices
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲23914.45 ▲0.071.99 ▲0.2038.99 ▼5.08
Dashboard /wp-admin2,403 ▲2266.19 ▲0.60120.42 ▲29.4942.89 ▲2.55
Posts /wp-admin/edit.php2,321 ▲2183.27 ▲1.2953.02 ▲10.7232.10 ▼4.28
Add New Post /wp-admin/post-new.php1,621 ▲8618.20 ▼0.21623.69 ▼38.0346.55 ▼9.76
Media Library /wp-admin/upload.php1,456 ▲534.14 ▼0.0087.32 ▼19.0343.94 ▼1.71
Auteurs /wp-admin/edit.php?post_type=auteur1,2923.3244.6929.56
Add New /wp-admin/post-new.php?post_type=auteur2,2777.56156.9576.36
Familles /wp-admin/edit-tags.php?taxonomy=famille&post_type=notice1,4993.1441.1629.97
Add New /wp-admin/post-new.php?post_type=notice2,8668.91226.88140.83
Notices /wp-admin/edit.php?post_type=notice1,3143.3942.0028.94
Mots-clés /wp-admin/edit-tags.php?taxonomy=mot-cle&post_type=notice1,4713.0841.9129.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/crem-notices/meta-box/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=mot-cle&post_type=notice
    • > Warning in wp-content/plugins/crem-notices/meta-box/init.php+746
    count(): Parameter must be an array or an object that implements Countable

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
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/crem-notices/crem_notices_metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/crem-notices/crem_notices_auteur_metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crem-notices/templates/auteur-single-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crem-notices/templates/notice-single-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crem-notices/templates/notice-archive-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/crem-notices/meta-box/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crem-notices/crem_notices_custom-post.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crem-notices/crem_notices_custom-post.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crem-notices/templates/notice-auteur-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crem-notices/templates/notice-alpha-template.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=notice
    • > Network (severe)
    wp-content/plugins/crem-notices/meta-box/js/cmb.min.js?ver=1.2.0 - Failed to load resource: the server responded with a status of 404 (Not 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:
  • Plugin Name: You should set the name of your plugin on the first line ( === crem-notices === )
The official readme.txt might help

crem-notices/crem_notices.php 92% from 13 tests

This is the main PHP file of "crem_notices" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crem-notices.php" instead of "crem_notices.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
There were no executable files found in this plugin4,490 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP156021,1072,320
JavaScript43063742,169
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity66.50
▷ Minimum class complexity20.00
▷ Maximum class complexity136.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods133
▷ Static methods3425.56%
▷ Public methods13198.50%
▷ Protected methods21.50%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin