78% copy-posts

Code Review | Copy Post

WordPress plugin Copy Post scored78%from 54 tests.

About plugin

  • Plugin page: copy-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: May 25, 2018
  • Latest release: May 25, 2018
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: ipressgo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,170 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼7.10ms] Passed 4 tests

Analyzing server-side resources used by Copy Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.01 ▲0.27
Dashboard /wp-admin3.54 ▲0.1949.92 ▼9.77
Posts /wp-admin/edit.php3.66 ▲0.2949.46 ▼1.78
Add New Post /wp-admin/post-new.php6.12 ▲0.2391.95 ▼14.64
Media Library /wp-admin/upload.php3.47 ▲0.2340.63 ▼2.22
Settings /wp-admin/admin.php?page=ipressgo-copy-post-settings3.4336.86

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Copy Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.72 ▲0.371.78 ▲0.0141.40 ▼6.04
Dashboard /wp-admin2,210 ▲365.51 ▼0.0584.84 ▼7.4983.41 ▲41.63
Posts /wp-admin/edit.php2,118 ▲181.98 ▲0.0234.81 ▼2.8934.95 ▼2.55
Add New Post /wp-admin/post-new.php1,554 ▲2823.04 ▲0.05759.22 ▲104.5856.82 ▲6.88
Media Library /wp-admin/upload.php1,409 ▲94.23 ▲0.06101.36 ▼8.0071.43 ▲21.66
Settings /wp-admin/admin.php?page=ipressgo-copy-post-settings8612.1423.5524.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/copy-posts/inc/class-ipgs-admin.php
    • > /wp-content/plugins/copy-posts/inc/class-ipgs-job.php
    • > /wp-content/plugins/copy-posts/inc/class-ipgs-db.php
    • > /wp-content/plugins/copy-posts/templates/admin-support.php
    • > /wp-content/plugins/copy-posts/templates/admin-settings.php
    • > /wp-content/plugins/copy-posts/inc/class-ipgs-rest-connect.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/copy-posts/templates/admin-jobs.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/copy-posts/templates/admin-main.php:2

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: copy posts, syndication, copy job, schedule posts

copy-posts/ipressgo-copy-post.php 77% from 13 tests

This is the main PHP file of "Copy Post" version 1.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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("copy-posts.php" instead of "ipressgo-copy-post.php")
  • Description: The description should be shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,889 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP103201791,324
CSS1159342
JavaScript11817223

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity35.40
▷ Minimum class complexity8.00
▷ Maximum class complexity113.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods62
▷ Static methods58.06%
▷ Public methods5385.48%
▷ Protected methods00.00%
▷ Private methods914.52%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/ipressgo-icon.png0.64KB0.80KB0.00%