78% easy-repeater

Code Review | easy repeater

WordPress plugin easy repeater scored78%from 54 tests.

About plugin

  • Plugin page: easy-repeater
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.4
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Feb 10, 2016
  • Number of updates: 38
  • Update frequency: every 4.1 days
  • Top authors: shokry055 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,151 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.02ms] Passed 4 tests

A check of server-side resources used by easy repeater
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1038.69 ▼6.39
Dashboard /wp-admin3.46 ▲0.1251.08 ▼0.07
Posts /wp-admin/edit.php3.58 ▲0.1851.84 ▲0.45
Add New Post /wp-admin/post-new.php6.15 ▲0.2290.97 ▼2.05
Media Library /wp-admin/upload.php3.39 ▲0.1239.34 ▲2.86
repeater options /wp-admin/admin.php?page=easy-repeater-main-options3.3741.12
easy repeater /wp-admin/admin.php?page=easy-repeater3.5445.85

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
repeat_main_array_save
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for easy repeater
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.75 ▲0.151.63 ▼0.2239.73 ▼5.17
Dashboard /wp-admin2,228 ▲545.67 ▲0.1394.27 ▼5.5387.52 ▲45.60
Posts /wp-admin/edit.php2,148 ▲481.98 ▼0.1036.40 ▲0.3730.79 ▼2.12
Add New Post /wp-admin/post-new.php6,422 ▲4,89426.26 ▲3.04938.92 ▲252.6454.40 ▼3.84
Media Library /wp-admin/upload.php1,448 ▲484.23 ▼0.05100.06 ▼23.5463.66 ▲14.67
repeater options /wp-admin/admin.php?page=easy-repeater-main-options1,1743.2845.0279.71
easy repeater /wp-admin/admin.php?page=easy-repeater1,4153.2353.5394.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • repeat_main_array_save
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=easy-repeater-main-options
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-repeater/options-functions.php
    • > /wp-content/plugins/easy-repeater/options_admin.php
    • > /wp-content/plugins/easy-repeater/options.php
    • > /wp-content/plugins/easy-repeater/easy-metabox.php
    • > /wp-content/plugins/easy-repeater/easy-reapeater.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)
Everything seems fine on the user side

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: "Plugin Name" should be replaced with the name of your plugin on the first line ( === easy-repeater === )
You can look at the official readme.txt

easy-repeater/easy-reapeater.php 92% from 13 tests

The main file in "easy repeater" v. 2.0.2 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: Name the main plugin file the same as the plugin slug ("easy-repeater.php" instead of "easy-reapeater.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,769 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP591721,001
CSS280419
PO File398121267
JavaScript11882

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.11MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/op4.png17.94KB0.22KB▼ 98.76%
imgs/op1.png17.83KB0.17KB▼ 99.03%
imgs/icon.png17.60KB0.12KB▼ 99.31%
imgs/op2.png18.07KB0.29KB▼ 98.40%
imgs/no.png19.26KB7.06KB▼ 63.34%