10% primer-by-chloedigital

Code Review | PRIMER by chloédigital

WordPress plugin PRIMER by chloédigital scored 10% from 54 tests.

About plugin

  • Plugin page: primer-by-chloedi...
  • Plugin version: 1.0.25
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 13, 2018
  • Latest release: Aug 18, 2020
  • Number of updates: 46
  • Update frequency: every 14.0 days
  • Top authors: chloedigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,773 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/primer-by-chloedigital/database_changes.php+16
    count(): Parameter must be an array or an object that implements Countable

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

A check of server-side resources used by PRIMER by chloédigital
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2037.76 ▼3.14
Dashboard /wp-admin3.50 ▲0.2046.77 ▼0.28
Posts /wp-admin/edit.php3.62 ▲0.2647.43 ▼4.04
Add New Post /wp-admin/post-new.php6.10 ▲0.2295.93 ▲0.84
Media Library /wp-admin/upload.php3.42 ▲0.2038.69 ▲3.59

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: 1 new table, 7 new options
New tables
wp_primer_data
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
my_db_version
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for PRIMER by chloédigital
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.22 ▼1.074.51 ▲2.3639.90 ▼5.16
Dashboard /wp-admin2,234 ▲465.94 ▼0.0497.82 ▼22.0387.68 ▲42.40
Posts /wp-admin/edit.php2,146 ▲572.25 ▲0.2034.42 ▼0.5237.11 ▲3.10
Add New Post /wp-admin/post-new.php6,707 ▲5,17323.27 ▲0.21945.25 ▲270.3654.48 ▼15.67
Media Library /wp-admin/upload.php1,428 ▲404.34 ▲0.11100.95 ▼9.5384.33 ▲40.59

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
  • Zombie tables detected upon uninstall: 1 table
    • wp_primer_data
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • my_db_version
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 | 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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/primer-by-chloedigital/public/partials/primer-by-chloedigital-public-display.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/primer-by-chloedigital/admin/inc/notifications.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/primer-by-chloedigital/admin/inc/post-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/primer-by-chloedigital/admin/partials/global-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/primer-by-chloedigital/admin/class-primer-by-chloedigital-admin.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/primer-by-chloedigital/includes/class-primer-by-chloedigital-activator.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/primer-by-chloedigital/admin/partials/primer-settings.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/primer-by-chloedigital/admin/inc/save-global-data.php:125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/primer-by-chloedigital/admin/partials/global-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === PRIMER by chloédigital === )
You can look at the official readme.txt

primer-by-chloedigital/primer-by-chloedigital.php 92% from 13 tests

The main file in "PRIMER by chloédigital" v. 1.0.25 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,260 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP182726491,350
CSS28717765
JavaScript5129595
SVG50350

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 1.93MB with 1.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png114.79KB44.27KB▼ 61.44%
admin/partials/Primer-Instagram.png20.57KB11.21KB▼ 45.53%
assets/screenshot-3.png86.25KB19.25KB▼ 77.68%
assets/banner-772x500.png39.30KB15.95KB▼ 59.41%
admin/partials/Primer-Facebook.png25.47KB15.59KB▼ 38.79%