84% cyoud-first-paragraph

Code Review | Cyoud First Paragraph

WordPress plugin Cyoud First Paragraph scored84%from 54 tests.

About plugin

  • Plugin page: cyoud-first-parag...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0.1
  • WordPress version: 6.3.1
  • First release: Jun 1, 2018
  • Latest release: Dec 16, 2018
  • Number of updates: 5
  • Update frequency: every 39.6 days
  • Top authors: cyoud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.25ms] Passed 4 tests

An overview of server-side resources used by Cyoud First Paragraph
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.24 ▲2.30
Dashboard /wp-admin3.33 ▲0.0343.48 ▼5.49
Posts /wp-admin/edit.php3.38 ▲0.0348.64 ▼0.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0598.75 ▼6.62
Media Library /wp-admin/upload.php3.26 ▲0.0333.85 ▼0.06
Cyoud FP /wp-admin/options-general.php?page=cfp3.2231.11

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 10 new options
New WordPress options
yhtmlc
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
cfp-topt
crp-nop
widget_theysaidso_widget
widget_recent-comments
db_upgraded
crp-opt

Browser metrics Passed 4 tests

Cyoud First Paragraph: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲15313.99 ▼0.399.23 ▲7.4254.04 ▲3.64
Dashboard /wp-admin2,214 ▲234.88 ▼1.02115.15 ▲13.0542.20 ▼2.54
Posts /wp-admin/edit.php2,097 ▲52.03 ▲0.0039.93 ▼0.7134.91 ▼1.74
Add New Post /wp-admin/post-new.php1,521 ▲717.63 ▲0.00649.26 ▼18.8053.67 ▼0.44
Media Library /wp-admin/upload.php1,396 ▲114.23 ▲0.10103.76 ▼10.5044.65 ▼2.70
Cyoud FP /wp-admin/options-general.php?page=cfp8451.7324.4227.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • crp-opt
    • widget_recent-comments
    • crp-nop
    • widget_theysaidso_widget
    • yhtmlc
    • can_compress_scripts
    • db_upgraded
    • cfp-topt
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cyoud-first-paragraph/cfp-main.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: html post, google adsense, first paragraph, inline related, related post

cyoud-first-paragraph/index.php 85% from 13 tests

The main PHP file in "Cyoud First Paragraph" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cyoud-first-paragraph.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin210 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21419141
CSS16447
JavaScript10022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin